Closed dspies-leapyear closed 5 years ago
Thanks for reporting this. I think I fixed it, try out version 1.9.3 on Hackage. Now it prints:
EntityDef
(HaskellName "User")
(DBName "user")
(FieldDef
(HaskellName "Id")
(DBName "id")
(FTTypeCon Nothing "UserId")
SqlInt64
[]
True
(ForeignRef
(HaskellName "User") (FTTypeCon (Just "Data.Int") "Int64")))
[]
[ FieldDef
(HaskellName "name")
(DBName "name")
(FTTypeCon Nothing "String")
SqlString
[]
True
NoReference
, FieldDef
(HaskellName "age")
(DBName "age")
(FTTypeCon Nothing "Int")
SqlInt64
[]
True
NoReference
, FieldDef
(HaskellName "dream")
(DBName "dream")
(FTTypeCon Nothing "String")
SqlString
[ "Maybe" ]
True
NoReference
, FieldDef
(HaskellName "home")
(DBName "home")
(FTTypeCon Nothing "AddressId")
(sqlType (Proxy :: Proxy Int64))
[]
True
(ForeignRef
(HaskellName "Address") (FTTypeCon (Just "Data.Int") "Int64"))
]
[]
[]
[ "Show" ]
(Map.fromList [])
False
which as far as I can tell is reasonable?
LGTM
I generated this
entityDef
withpersistent-template
(looking at-ddump-splices
) and then I tried to strip the unnecessary parentheses and clean it up by passing it toppsh
, but what it gave back wasn't the same structure.The first error here is that
(FTTypeCon Nothing "UserId")
became two separate parameters(FTTypeCon Nothing)
and"UserId"
became