on master help sign in
Merge branch 'master' of https://github.com/evancz/Elm
commitc02228fbd0cfc1de4f47db1718c9f0cfa0db667d authorevancz <info@elm-lang.org> dateThu 7 Feb 2013, 10:55 (14 years ago) parentcdecb5b6ce22a8
2 files changed+8−8
Examples/elm-happstack/Main.hs+3−3 Examples/elm-happstack/elm_source/index.elm+5−5
Examples/elm-happstack/Main.hs+3−3
@@ -6,7 +6,7 @@ import Language.Elm
66import Language.Elm.Quasi
77
88elmLoc :: String
9−elmLoc = "https://raw.github.com/evancz/Elm/master/elm/elm-runtime-0.3.5.js"
9+elmLoc = "https://raw.github.com/evancz/Elm/master/elm/elm-runtime-0.7.1.1.js"
1010
1111-- elmResponse is a "nice to have" helper function for compiling
1212-- Elm code when using Elm with Happstack. At some point this might
@@ -21,7 +21,7 @@ elmResponse title = toResponse . toHtml elmLoc title
2121rootHandler :: ServerPart Response
2222rootHandler = ok $ elmResponse "Welcome!" $ elmIndex
2323 where
24− mouse = "/mouse"
24+ mouse = "/mouse" -- all three of these variables are used in elm_source/index.elm
2525 clock = "/clock"
2626 shapes = "/shapes"
2727 elmIndex = $(elmFile "elm_source/index.elm")
@@ -64,4 +64,4 @@ elmExample =
6464 ]
6565
6666main :: IO ()
67−main = simpleHTTP nullConf {port = 3000} elmExample
67+main = simpleHTTP nullConf {port = 3000} elmExample
Examples/elm-happstack/elm_source/index.elm+5−5
@@ -19,15 +19,15 @@ section = text . bold . Text.height (5/4) . toText
1919
2020info w = List.map (\f -> f ()) . List.intersperse (\x -> plainText "&nbsp;") . List.map ((\e x -> e) . width w) $
2121 [ section "Written in Elm, served with Yesod"
22− , text $ toText "This page is written in " ++ link "http://elm-lang.org/" (toText "Elm") ++
22+ , text $ toText "This page is written in " ++ Text.link "http://elm-lang.org/" (toText "Elm") ++
2323 toText " and served using the " ++
24− link "http://yesodweb.com/" (toText "Yesod Web Framework") ++
24+ Text.link "http://yesodweb.com/" (toText "Yesod Web Framework") ++
2525 toText ". Since you are looking at this page it is safe to assume that you already have the example code. "
2626 , text $ toText "Type-safe URLs are rendered using simple QuasiQuoter variable interpolation."
2727 , section "More examples:"
28− , text $ toText "- " ++ link "@{MouseR}" (toText "A simple mouse input example")
29− , text $ toText "- " ++ link "@{ClockR}" (toText "An animated analog clock")
30− , text $ toText "- " ++ link "@{ShapesR}" (toText "Some simple rendered shapes")
28+ , text $ toText "- " ++ Text.link mouse (toText "A simple mouse input example")
29+ , text $ toText "- " ++ Text.link clock (toText "An animated analog clock")
30+ , text $ toText "- " ++ Text.link shapes (toText "Some simple rendered shapes")
3131 ]
3232
3333body outer inner = width outer . box 2 . flow down . (:) (plainText "&nbsp;") $ info inner