on master help sign in
* modified elm-server
08287fcVincent Ambo
elm/core-js/Element.js → core-js/Element.jsrenamed

The content is the same.

elm/core-js/Everything.js → core-js/Everything.jsrenamed

The content is the same.

elm/core-js/Guid.js → core-js/Guid.jsrenamed

The content is the same.

elm/core-js/List.js → core-js/List.jsrenamed

The content is the same.

elm/core-js/String.js → core-js/String.jsrenamed

The content is the same.

elm/core-js/Text.js → core-js/Text.jsrenamed

The content is the same.

elm/core-js/Value.js → core-js/Value.jsrenamed

The content is the same.

elm/core-js/cat-js.sh → core-js/cat-js.shrenamed

The content is the same.

elm/core-js/collage/Color.js → core-js/collage/Color.jsrenamed

The content is the same.

elm/core-js/collage/Form.js → core-js/collage/Form.jsrenamed

The content is the same.

elm/core-js/collage/Image.js → core-js/collage/Image.jsrenamed

The content is the same.

elm/core-js/collage/Line.js → core-js/collage/Line.jsrenamed

The content is the same.

elm/core-js/collage/Shape.js → core-js/collage/Shape.jsrenamed

The content is the same.

elm/core-js/runtime/Dispatcher.js → core-js/runtime/Dispatcher.jsrenamed

The content is the same.

elm/core-js/runtime/Signal.js → core-js/runtime/Signal.jsrenamed

The content is the same.

elm-blaze/GenerateHtml.hsdeleted−42
@@ -1,42 +0,0 @@
1−{-# LANGUAGE OverloadedStrings #-}
2−module GenerateHtml (generateHtml) where
3−
4−import Text.Blaze (preEscapedToMarkup)
5−import qualified Text.Blaze.Html5 as H
6−import Text.Blaze.Html5 ((!))
7−import qualified Text.Blaze.Html5.Attributes as A
8−
9−import Initialize
10−import CompileToJS
11−import ExtractNoscript
12−
13−css = preEscapedToMarkup $
14− ("* { padding:0; margin:0; \
15− \hyphens: auto; -moz-hyphens: auto;\
16− \ -webkit-hyphens: auto; -ms-hyphens: auto; }\
17− \body { font-family: Arial; }\
18− \a:link {text-decoration: none}\
19− \a:visited {text-decoration: none}\
20− \a:active {text-decoration: none}\
21− \a:hover {text-decoration: underline; color: #ff8f12;}" :: String)
22−
23−makeScript :: String -> H.Html
24−makeScript s = H.script ! A.type_ "text/javascript" ! A.src (H.toValue s) $ ""
25−
26−generateHtml libLoc title source =
27− let expr = initialize source
28− js = compileToJS expr
29− noscript = either id extract expr
30− in
31− H.docTypeHtml $ do
32− H.head $ do
33− H.meta ! A.charset "UTF-8"
34− H.title . H.toHtml $ title
35− makeScript libLoc
36− H.script ! A.type_ "text/javascript" $ preEscapedToMarkup js
37− H.style ! A.type_ "text/css" $ css
38− H.body $ do
39− H.div ! A.id "widthChecker" ! A.style "width:100%; height:1px; position:absolute; top:-1px;" $ ""
40− H.span ! A.id "content" $ ""
41− H.script ! A.type_ "text/javascript" $ "Dispatcher.initialize()"
42− H.noscript $ preEscapedToMarkup noscript
elm-blaze/elm-blaze.cabaldeleted

No changes to the content.

elm-server/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-server/Server.hs+2−2
@@ -11,7 +11,7 @@ import Language.Elm
11
11
12serve :: String -> IO ()
12serve :: String -> IO ()
13serve libLoc = do
13serve libLoc = do
14− putStrLn "Elm Server 0.1.1.7: running at <http://localhost:8000>"
14+ putStrLn "Elm Server 0.1.1.8: running at <http://localhost:8000>"
15 simpleHTTP nullConf $ do
15 simpleHTTP nullConf $ do
16 compressedResponseFilter
16 compressedResponseFilter
17 msum [ uriRest (serveElm libLoc)
17 msum [ uriRest (serveElm libLoc)
@@ -25,7 +25,7 @@ serveElm libLoc fp = do
25 let ('/':path) = fp
25 let ('/':path) = fp
26 guard (".elm" `isSuffixOf` path)
26 guard (".elm" `isSuffixOf` path)
27 content <- liftIO (readFile path)
27 content <- liftIO (readFile path)
28− ok . toResponse $ compileToHtml libLoc (pageTitle path) content
28+ ok . toResponse $ generateHtml libLoc (pageTitle path) content
29
29
30
30
31main = getArgs >>= parse
31main = getArgs >>= parse
elm/elm-mini.js → elm-server/elm-mini.jsrenamed

The content is the same.

elm-server/elm-server.cabal+36−11
@@ -1,13 +1,38 @@
1+Name: Elm-server
2+Version: 0.1.1.8
3+Synopsis: The Elm language module.
4+Description: This package provides a standalone, Happstack-based Elm server.
5+
6+Homepage: http://elm-lang.org
7+
8+License: BSD3
9+License-file: LICENSE
10+
11+Author: Evan Czaplicki
12+Maintainer: info@elm-lang.org
13+Copyright: Copyright: (c) 2011-2012 Evan Czaplicki
14+
15+Category: Compiler, Language
16+
17+Build-type: Simple
18+
19+Extra-source-files: README.md
20+Cabal-version: >=1.6
21+
22+source-repository head
23+ type: git
24+ location: git://github.com/evancz/Elm.git
25+
1Executable elm-server
26Executable elm-server
2 Main-is: Server.hs
27 Main-is: Server.hs
3− Hs-Source-Dirs: src, src/Parse, src/Types
4− other-modules: Ast, CompileToJS, GenerateHtml, Guid, Initialize,
5− Rename, Language.Elm, Binop, Combinators, Lexer,
6− ParsePatterns, Parser, ParserLib, ParseTypes, Tokens,
7− Types, Constrain, Hints, Types, Unify, ExtractNoscript
8− ghc-options: -O3
28+ ghc-options: -O2
9− Build-depends: base >=4.2 && <5, containers >= 0.3, transformers >= 0.2,
29+ Build-depends: base >=4.2 && <5,
30+ containers >= 0.3,
31+ transformers >= 0.2,
32+ mtl >= 2,
33+ parsec >= 3.1.1,
10− mtl >= 2, parsec >= 3.1.1, blaze-html == 0.5.0.*,
34+ blaze-html == 0.5.0.*,
35+ HTTP >= 4000,
11− HTTP >= 4000, happstack-server == 7.0.2,
36+ happstack-server == 7.0.2,
12− deepseq, yesod-core, shakespeare-css, shakespeare-js, hamlet,
37+ deepseq,
13−
38+ Elm >= 0.1.1.8
elm/Elm.cabal+2−1
@@ -63,7 +63,8 @@ Library
63 exposed-modules: Language.Elm,
63 exposed-modules: Language.Elm,
64 Language.Elm.CompileToJS,
64 Language.Elm.CompileToJS,
65 Language.Elm.ExtractNoscript,
65 Language.Elm.ExtractNoscript,
66− Language.Elm.Initialize
66+ Language.Elm.Initialize,
67+ Language.Elm.GenerateHtml
67 Hs-Source-Dirs: src, src/Parse, src/Types
68 Hs-Source-Dirs: src, src/Parse, src/Types
68 other-modules: Ast,
69 other-modules: Ast,
69 Guid,
70 Guid,