
i get this a lot when I have a problem in the template. Like I have a value showInt :: Int -> String but I refer to it in a hamlet file as #{showInt} instead of #{showInt 5}. Also, might want to include [Yesod] or [Hamlet] in the subject line for questions about either of these. if you could attach your widget files that would help. max On Jun 29, 2011, at 5:54 PM, Kamil Ciemniewski wrote:
Hi all,
I've got another newbie problem.
Compiler yells at me: Handler/Admin.hs:15:3: Couldn't match type `Route master0' with `MyAppRoute' In the expression: adminLayout In the expression: adminLayout $ do { h2id <- lift newIdent; addWidget ($(widgetFile "admin/overview/index")) } In the expression: do { adminLayout $ do { h2id <- lift newIdent; addWidget ($(widgetFile "admin/overview/index")) } }
The adminLayout is defined as: adminLayout widget = do mmsg <- getMessage pc <- widgetToPageContent $ do widget hamletToRepHtml $(Settings.hamletFile "admin/admin-layout")
And data types are defined as: data MyApp = MyApp { getStatic :: Static -- ^ Settings for static file serving. } type Handler = GHandler MyApp MyApp type Widget = GWidget MyApp MyApp mkYesodData "MyApp" $(parseRoutesFile "config/routes")
routes are: /static StaticR Static getStatic
/favicon.ico FaviconR GET /robots.txt RobotsR GET
/ RootR GET
/admin AdminR GET
It's probably a silly mistake somewhere but, well.. I'm a newbie.
Best regards Kamil Ciemniewski _______________________________________________ web-devel mailing list web-devel@haskell.org http://www.haskell.org/mailman/listinfo/web-devel