dylex / postgresql-typed

Haskell PostgreSQL library with compile-time type inference
http://hackage.haskell.org/package/postgresql-typed
Other
83 stars 12 forks source link

Compilation fails on GHC 8.2.1 #6

Closed jforberg closed 6 years ago

jforberg commented 6 years ago

I can't compile postgresql-typed 0.5.1 on GHC 8.2.1 (template-haskell 2.12.0.0). I get the following error:

Database/PostgreSQL/Typed/Enum.hs:87:7: error:
    • Couldn't match type ‘TH.Type’ with ‘TH.DerivClause’
      Expected type: [TH.DerivClause]
        Actual type: [TH.Type]
    • In the second argument of ‘($)’, namely
        ‘map TH.ConT [''Eq, ''Ord, ''Enum, ''Ix, ....]’
      In the expression:
        TH.DataD
          [] typn [] Nothing (map (\ (n, _) -> TH.NormalC n []) valn)
          $ map TH.ConT [''Eq, ''Ord, ''Enum, ''Ix, ....]
      In the first argument of ‘(++)’, namely
        ‘[TH.DataD
            [] typn [] Nothing (map (\ (n, _) -> TH.NormalC n []) valn)
            $ map TH.ConT [''Eq, ''Ord, ....],
          instanceD
            []
            (TH.ConT ''PGType `TH.AppT` typl)
            [TH.TySynInstD ''PGVal $ TH.TySynEqn [...] typt],
          instanceD
            []
            (TH.ConT ''PGParameter `TH.AppT` typl `TH.AppT` typt)
            [TH.FunD 'pgEncode [...]],
          instanceD
            []
            (TH.ConT ''PGColumn `TH.AppT` typl `TH.AppT` typt)
            [TH.FunD 'pgDecode [...]],
          ....]’
   |
87 |       map TH.ConT
   |       ^^^^^^^^^^^...

I've confirmed that compilation still works on GHC 8.0.2 (template-haskell 2.11.1.0).

jforberg commented 6 years ago

Thanks!