
On Sun, Sep 9, 2012 at 5:48 PM, Arthur Clemens
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-breadcrumbs
I created a new scaffolded site, used add-handler to create Handler/Admin.hs, and changed the route in config/routes to
/admin AdminR: / AdminRootR GET
yesod devel results in Application.hs:27:1: Not in scope: data constructor `AdminRootR'
changing that to
/admin AdminRootR GET
runs 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 in
Import.hs:10:2: lexical error at character 'i'
Using ghc -cpp -ddump-splices main.hs
results in Model.hs:13:1: Parse error: naked expression at top level
Arthur
Sorry, I should have clarified: you can do something like: cabal configure --ghc-option=-ddump-splices Then `cabal build` will pass in that option. You get the "naked expression" error because TemplateHaskell isn't enabled. Michael