danr / geniplate

Use TH to generate uniplate-like functions.
BSD 3-Clause "New" or "Revised" License
5 stars 5 forks source link

Does not build using GHC 8.0.1-rc4 #5

Closed nad closed 7 years ago

nad commented 8 years ago
[1 of 1] Compiling Data.Generics.Geniplate ( Data/Generics/Geniplate.hs, dist/build/Data/Generics/Geniplate.o )

Data/Generics/Geniplate.hs:83:25: error:
    • Couldn't match expected type ‘Dec’
                  with actual type ‘[Dec] -> Dec’
    • Probable cause: ‘InstanceD’ is applied to too few arguments
      In the expression:
        InstanceD [] (foldl AppT (ConT cls) ts) (funDef met e)
      In the expression:
        [InstanceD [] (foldl AppT (ConT cls) ts) (funDef met e)]
      In an equation for ‘instDef’:
          instDef cls ts met e
            = [InstanceD [] (foldl AppT (ConT cls) ts) (funDef met e)]

Data/Generics/Geniplate.hs:83:35: error:
    • Couldn't match expected type ‘Maybe Overlap’
                  with actual type ‘[t0]’
    • In the first argument of ‘InstanceD’, namely ‘[]’
      In the expression:
        InstanceD [] (foldl AppT (ConT cls) ts) (funDef met e)
      In the expression:
        [InstanceD [] (foldl AppT (ConT cls) ts) (funDef met e)]

Data/Generics/Geniplate.hs:83:39: error:
    • Couldn't match type ‘Type’ with ‘[Pred]’
      Expected type: Cxt
        Actual type: Type
    • In the second argument of ‘InstanceD’, namely
        ‘(foldl AppT (ConT cls) ts)’
      In the expression:
        InstanceD [] (foldl AppT (ConT cls) ts) (funDef met e)
      In the expression:
        [InstanceD [] (foldl AppT (ConT cls) ts) (funDef met e)]

Data/Generics/Geniplate.hs:83:66: error:
    • Couldn't match expected type ‘Type’ with actual type ‘[Dec]’
    • In the third argument of ‘InstanceD’, namely ‘(funDef met e)’
      In the expression:
        InstanceD [] (foldl AppT (ConT cls) ts) (funDef met e)
      In the expression:
        [InstanceD [] (foldl AppT (ConT cls) ts) (funDef met e)]
nad commented 8 years ago

Adding Nothing after InstanceD makes the code compile, and seems to work for Agda.

minad commented 7 years ago

this was fixed by #4