on master help sign in
* modified elm-yesod to work and updated the example
c6bd8bfVincent Ambo
Examples/elm-yesod/Main.hs+1−1
@@ -1,9 +1,9 @@
1{-# LANGUAGE QuasiQuotes, TemplateHaskell, OverloadedStrings, TypeFamilies, MultiParamTypeClasses #-}
1{-# LANGUAGE QuasiQuotes, TemplateHaskell, OverloadedStrings, TypeFamilies, MultiParamTypeClasses #-}
2
2
3import Data.Text (Text)
3import Data.Text (Text)
4+import Language.Elm
4import Language.Elm.Yesod
5import Language.Elm.Yesod
5import Yesod
6import Yesod
6−import Yesod.Static
7import Yesod.Default.Util
7import Yesod.Default.Util
8import Text.Hamlet
8import Text.Hamlet
9import Text.Julius
9import Text.Julius
Examples/elm-yesod/client_session_key.aesnew file+1
@@ -0,0 +1 @@
1+GDfV��U.ec �XgA�.:�f���a+F�|�x�*���y��ǃ2�r?��/�e���,_�>ǣ<��a #IƎ��8�93�b?�>/1���O{�߿b�z�
elm-server/elm-server.cabal+1−1
@@ -1,6 +1,6 @@
1Name: Elm-server
1Name: Elm-server
2Version: 0.1.1.8
2Version: 0.1.1.8
3−Synopsis: The Elm language module.
3+Synopsis: The Elm language server.
4Description: This package provides a standalone, Happstack-based Elm server.
4Description: This package provides a standalone, Happstack-based Elm server.
5
5
6Homepage: http://elm-lang.org
6Homepage: http://elm-lang.org
elm-yesod/LICENSEnew file+30
@@ -0,0 +1,30 @@
1+Copyright (c)2012, Evan Czaplicki
2+
3+All rights reserved.
4+
5+Redistribution and use in source and binary forms, with or without
6+modification, are permitted provided that the following conditions are met:
7+
8+ * Redistributions of source code must retain the above copyright
9+ notice, this list of conditions and the following disclaimer.
10+
11+ * Redistributions in binary form must reproduce the above
12+ copyright notice, this list of conditions and the following
13+ disclaimer in the documentation and/or other materials provided
14+ with the distribution.
15+
16+ * Neither the name of Evan Czaplicki nor the names of other
17+ contributors may be used to endorse or promote products derived
18+ from this software without specific prior written permission.
19+
20+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
elm-yesod/Yesod.hs → elm-yesod/Language/Elm/Yesod.hsrenamed+4−6
@@ -1,18 +1,16 @@
1−{-# LANGUAGE QuasiQuotes, TemplateHaskell #-}
1+{-# LANGUAGE QuasiQuotes #-}
2
2
3module Language.Elm.Yesod (generateWidget) where
3module Language.Elm.Yesod (generateWidget) where
4
4
5−import Language.Haskell.TH.Quote
6−import Language.Haskell.TH
7import Text.Blaze (preEscapedToMarkup)
5import Text.Blaze (preEscapedToMarkup)
8import Text.Hamlet
6import Text.Hamlet
9import Text.Julius
7import Text.Julius
10import Text.Lucius
8import Text.Lucius
11import Yesod.Widget
9import Yesod.Widget
12
10
13−import Initialize
11+import Language.Elm.Initialize
14−import CompileToJS
12+import Language.Elm.CompileToJS
15−import ExtractNoscript
13+import Language.Elm.ExtractNoscript
16
14
17css = [lucius|
15css = [lucius|
18* { padding:0; margin:0;
16* { padding:0; margin:0;
elm-yesod/elm-yesod.cabalnew file+35
@@ -0,0 +1,35 @@
1+Name: Elm-yesod
2+Version: 0.1.1.8
3+Synopsis: The Elm language Yesod compatibility module.
4+Description: This module provides a simple function to embed Elm code
5+ as a Yesod widget.
6+
7+Homepage: http://elm-lang.org
8+
9+License: BSD3
10+License-file: LICENSE
11+
12+Author: Evan Czaplicki
13+Maintainer: info@elm-lang.org
14+Copyright: Copyright: (c) 2011-2012 Evan Czaplicki
15+
16+Category: Compiler, Language
17+
18+Build-type: Simple
19+
20+Extra-source-files: README.md
21+Cabal-version: >=1.6
22+
23+source-repository head
24+ type: git
25+ location: git://github.com/evancz/Elm.git
26+
27+Library
28+ exposed-modules: Language.Elm.Yesod
29+ Build-depends: base >=4.2 && <5,
30+ blaze-markup == 0.5.*,
31+ Elm >= 0.1.1.8,
32+ yesod-core >= 1,
33+ hamlet,
34+ shakespeare-css,
35+ shakespeare-js