
9 May
2011
9 May
'11
6:20 p.m.
Hey, 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?