Skip to content

Seems not to want to compile on ghc 9.2.1 #45

@danwdart

Description

@danwdart

I'm getting:

[4 of 4] Compiling Data.Constraint.Extras.TH ( src/Data/Constraint/Extras/TH.hs, dist/build/Data/Constraint/Extras/TH.o, dist/build/Data/Constraint/Extras/TH.dyn_o )

src/Data/Constraint/Extras/TH.hs:55:22: error:
    • Couldn't match expected type ‘Pat’
                  with actual type ‘[Pat] -> Pat’
    • Probable cause: ‘ConP’ is applied to too few arguments
      In the first argument of ‘Match’, namely ‘(ConP name pat)’
      In the expression:
        Match
          (ConP name pat) (NormalB $ AppE (VarE argDictName) (VarE v)) []
      In the expression:
        [Match
           (ConP name pat) (NormalB $ AppE (VarE argDictName) (VarE v)) []]
   |
55 |           in [Match (ConP name pat) (NormalB $ AppE (VarE argDictName) (VarE v)) []]
   |                      ^^^^^^^^^^^^^

src/Data/Constraint/Extras/TH.hs:55:32: error:
    • Couldn't match type ‘Pat’ with ‘Type’
      Expected: [Type]
        Actual: [Pat]
    • In the second argument of ‘ConP’, namely ‘pat’
      In the first argument of ‘Match’, namely ‘(ConP name pat)’
      In the expression:
        Match
          (ConP name pat) (NormalB $ AppE (VarE argDictName) (VarE v)) []
   |
55 |           in [Match (ConP name pat) (NormalB $ AppE (VarE argDictName) (VarE v)) []]
   |             

Perhaps might want to switch via CPP on the TH version and treat the constructors differently.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions