mirror of
https://github.com/khibino/haskell-relational-record.git
synced 2024-12-27 14:02:35 +03:00
relational-query: apply th-data-compat-0.1.3.0 to fix build
This commit is contained in:
parent
85e02bcc27
commit
74b279f87d
@ -124,6 +124,7 @@ library
|
||||
, template-haskell
|
||||
, th-reify-compat
|
||||
, th-constraint-compat
|
||||
, th-data-compat
|
||||
, product-isomorphic >= 0.0.3
|
||||
, sql-words >=0.1.5
|
||||
, names-th
|
||||
|
@ -27,6 +27,7 @@ import Language.Haskell.TH
|
||||
Dec, sigD, valD, instanceD,
|
||||
TyVarBndr (PlainTV), )
|
||||
import Language.Haskell.TH.Compat.Constraint (classP)
|
||||
import Language.Haskell.TH.Compat.Data (plainTVspecified)
|
||||
import Database.Record.Persistable
|
||||
(PersistableWidth, persistableWidth,
|
||||
PersistableRecordWidth, runPersistableRecordWidth)
|
||||
@ -59,7 +60,7 @@ defineRecordProjections tyRec avs sels cts =
|
||||
template :: TypeQ -> [TypeQ] -> Name -> Q [Dec]
|
||||
template ct pcts selN = do
|
||||
sig <- sigD selN $
|
||||
forallT (map PlainTV avs)
|
||||
forallT (map plainTVspecified avs)
|
||||
(mapM (classP ''PersistableWidth . (:[]) . varT) avs)
|
||||
[t| Pi $tyRec $ct |]
|
||||
let runPW t = [| runPersistableRecordWidth (persistableWidth :: PersistableRecordWidth $t) |]
|
||||
|
Loading…
Reference in New Issue
Block a user