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