No title

Anonymous Coward 2018-03-08 18:03:59.670837 UTC

1main :: IO ()
2main = hakyllWithStatic config $ \ staticSite -> do
3 -- Yesod foundation value for route URL rendering
4 let app = App staticSite AuthSite GitRev
5
6 let avatar = StaticR img_main_avatar_png
7 userEmail :: String
8 let userEmail = "user@example.tld"
9
10 -- Static assets
11 match "static/**" $ do
12 route idRoute
13 compile copyFileCompiler
14
15 -- Main parent template and partials
16 match "templates/main/main.hamlet" $ do
17 let navbar = $(hamletFile "templates/main/_navbar.hamlet")
18 let footer = $(hamletFile "templates/main/_footer.hamlet")
19 compile $ hamletTemplateCompiler app $(hamletFile "templates/main/main.hamlet")
20
21
22/home/iko/ui-prototype/src/Main.hs:42:5: error: Variable not in scope: userEmail :: String
23
24/home/iko/ui-prototype/src/Main.hs:42:5: error:
25Couldn't match type ‘[]’ with ‘Rules
26 Expected type: Rules Char
27 Actual type: String
28In a stmt of a 'do' block: userEmail :: String
29 In the expression:
30 do { let app = App staticSite AuthSite GitRev;
31 let avatar = StaticR img_main_avatar_png;
32 userEmail :: String;
33 let userEmail = "user@example.tld";
34 .... }
35 In the second argument of ‘($)’, namely
36 ‘\ staticSite
37 -> do { let ...;
38 let ...;
39 .... }’