mirror of
https://github.com/khibino/haskell-relational-record.git
synced 2024-09-11 08:55:25 +03:00
persistable-record: use warpped interface.
This commit is contained in:
parent
9b95f6a121
commit
601e7a534a
@ -68,10 +68,10 @@ import Language.Haskell.TH.Name.CamelCase
|
||||
(ConName(conName), VarName(varName),
|
||||
conCamelcaseName, varCamelcaseName, varNameWithPrefix,
|
||||
toTypeCon, toDataCon)
|
||||
import Language.Haskell.TH.Lib.Extra (integralE, simpleValD)
|
||||
import Language.Haskell.TH.Lib.Extra (integralE, simpleValD, reportWarning)
|
||||
import Language.Haskell.TH.Compat.Data (dataD', unDataD)
|
||||
import Language.Haskell.TH
|
||||
(Q, report, nameBase, reify, Info(TyConI), Name,
|
||||
(Q, nameBase, reify, Info(TyConI), Name,
|
||||
TypeQ, conT, Con (NormalC, RecC),
|
||||
Dec,
|
||||
ExpQ, conE, listE, sigE,
|
||||
@ -196,7 +196,7 @@ defineRecordType typeName' columns derives = do
|
||||
let typeName = conName typeName'
|
||||
fld (n, tq) = varStrictType (varName n) (strictType isStrict tq)
|
||||
derives1 <- if (''Generic `notElem` derives)
|
||||
then do report False "HRR needs Generic instance, please add ''Generic manually."
|
||||
then do reportWarning "HRR needs Generic instance, please add ''Generic manually."
|
||||
return $ ''Generic : derives
|
||||
{- DROP this hack in future version ups. -}
|
||||
else return derives
|
||||
|
Loading…
Reference in New Issue
Block a user