[web-devel] Template Haskell intricacies with mkPersist
patrick at parcs.ath.cx
Tue May 10 00:20:49 CEST 2011
I've attached a file that fails to compile, resulting in a "not in scope:
getHomeR" error message. The culprit seems to be the mkPersist TH splice,
which, when ocurring before the getHomeR view, causes it to not be seen
by GHC when it parses the mkYesod splice. Moving the mkPersist splice to
occur after the getHomeR view will alleviate this problem, but then one can't
use the data constructors that mkPersist generates within the getHomeR
view. Moving the mkPersist splice into a seperate module and importing
that works perfectly fine, however.
Can anyone clarify what is going on?
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 517 bytes
More information about the web-devel