On Sun, Sep 9, 2012 at 5:48 PM, Arthur Clemens <arthurclemens@gmail.com> wrote:
You'll need the AdminR constructor: AdminR AdminRootR.It doesn't work in the scaffolded site, whereas it works as expected in a single file site like https://github.com/yesodweb/yesod/wiki/Hierarchical-routes-and-breadcrumbsI created a new scaffolded site, used add-handler to create Handler/Admin.hs, and changed the route in config/routes to/admin AdminR:/ AdminRootR GETyesod devel results in Application.hs:27:1: Not in scope: data constructor `AdminRootR'changing that to/admin AdminRootR GETruns without errors.Just to confirm: does your `cabal` file state Yesod version 1.0 or 1.1?
If you use
-ddump-splices when compiling, GHC will spit out the generated
code/data types, which should give a good idea of what's going on
under the surface.I can't, it results inImport.hs:10:2: lexical error at character 'i'
Using ghc -cpp -ddump-splices main.hsresults in Model.hs:13:1: Parse error: naked expression at top level
ArthurSorry, I should have clarified: you can do something like:cabal configure --ghc-option=-ddump-splicesThen `cabal build` will pass in that option. You get the "naked expression" error because TemplateHaskell isn't enabled.Michael