[web-devel] [ Newbie ] Problem with Route type
Kamil Ciemniewski
ciemniewski.kamil at gmail.com
Wed Jun 29 11:54:09 CEST 2011
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/web-devel/attachments/20110629/f677a0de/attachment.htm>
More information about the web-devel
mailing list