relational-query: apply th-data-compat-0.1.3.0 to fix build

This commit is contained in:
Kei Hibino 2023-11-25 17:10:25 +09:00
parent 85e02bcc27
commit 74b279f87d
2 changed files with 3 additions and 1 deletions

View File

@ -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

View File

@ -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) |]