on master help sign in
Show version numbers correctly.
commitb2147418e0372eac9185dbd473c74026bb166119 authorevancz <info@elm-lang.org> dateWed 3 Oct 2012, 03:17 (14 years ago) parent253e768
6 files changed+14−11
elm-server/Server.hs+5−4 elm-server/elm-server.cabal+2−2 elm/Elm.cabal+2−2 elm/elm-runtime-0.4.0.3.js → elm/elm-runtime-0.4.0.4.js elm/src/Compiler.hs+3−2 elm/src/Language/Elm.hs+2−1
elm-server/Server.hs+5−4
@@ -4,6 +4,7 @@ module Main where
44import Control.Monad (msum,guard)
55import Control.Monad.Trans (MonadIO(liftIO))
66import Data.List (isPrefixOf, isSuffixOf)
7+import Data.Version (showVersion)
78import Happstack.Server
89import Happstack.Server.Compression
910import System.Directory (makeRelativeToCurrentDirectory)
@@ -11,11 +12,11 @@ import System.Environment
1112import qualified Language.Elm as Elm
1213import Paths_elm_server
1314
14−runtime = "/elm-" ++ show version ++ ".js"
15+runtime = "elm-" ++ showVersion version ++ ".js"
1516
1617serve :: String -> IO ()
1718serve libLoc = do
18− putStrLn ("Elm Server "++show version++": running at <http://localhost:8000>")
19+ putStrLn ("Elm Server " ++ showVersion version ++ ": running at <http://localhost:8000>")
1920 simpleHTTP nullConf $ do
2021 _ <- compressedResponseFilter
2122 msum [ uriRest serveElm
@@ -34,7 +35,7 @@ serveElm fp = do
3435 ok . toResponse $ Elm.toHtml runtime (pageTitle filePath) content
3536
3637serveLib libLoc fp = do
37− guard (fp == runtime)
38+ guard (fp == '/' : runtime)
3839 serveFile (asContentType "application/javascript") libLoc
3940
4041main :: IO ()
@@ -42,7 +43,7 @@ main = getArgs >>= parse
4243
4344parse :: [String] -> IO ()
4445parse ("--help":_) = putStrLn usage
45−parse ("--version":_) = putStrLn ("The Elm Server " ++ show version)
46+parse ("--version":_) = putStrLn ("The Elm Server " ++ showVersion version)
4647parse [] = serve =<< Elm.runtimeLocation
4748parse [arg]
4849 | "--runtime-location=" `isPrefixOf` arg =
elm-server/elm-server.cabal+2−2
@@ -1,5 +1,5 @@
11Name: elm-server
2−Version: 0.4.0.3
2+Version: 0.4.0.4
33Synopsis: The Elm language server.
44Description: This package provides a standalone, Happstack-based Elm server.
55
@@ -35,4 +35,4 @@ Executable elm-server
3535 happstack-server == 7.0.2,
3636 deepseq,
3737 directory,
38− Elm >= 0.4.0.3
38+ Elm >= 0.4.0.4
elm/Elm.cabal+2−2
@@ -1,6 +1,6 @@
11
22Name: Elm
3−Version: 0.4.0.3
3+Version: 0.4.0.4
44Synopsis: The Elm language module.
55Description: Elm aims to make client-side web-development more pleasant.
66 It is a statically/strongly typed, functional reactive
@@ -22,7 +22,7 @@ Category: Compiler, Language
2222Build-type: Simple
2323
2424Extra-source-files: changelog.txt
25−Data-files: elm-runtime-0.4.0.3.js
25+Data-files: elm-runtime-0.4.0.4.js
2626Cabal-version: >=1.8
2727
2828source-repository head
elm/elm-runtime-0.4.0.3.js → elm/elm-runtime-0.4.0.4.jsrenamed

The content is the same.

elm/src/Compiler.hs+3−2
@@ -4,6 +4,7 @@ module Main where
44import Data.Either (lefts, rights)
55import Data.List (intersect, intercalate)
66import Data.Maybe (fromMaybe)
7+import Data.Version (showVersion)
78import System.Console.CmdArgs
89import Text.Blaze.Html.Renderer.String (renderHtml)
910
@@ -40,11 +41,11 @@ elm = ELM { make = False &= help "automatically compile dependencies."
4041 , minify = False &= help "Minify generated JavaScript"
4142 } &=
4243 help "Compile Elm programs to HTML, CSS, and JavaScript." &=
43− summary ("The Elm Compiler " ++ show version ++ ", (c) Evan Czaplicki")
44+ summary ("The Elm Compiler " ++ showVersion version ++ ", (c) Evan Czaplicki")
4445
4546main = do
4647 args <- cmdArgs elm
47− mini <- getDataFileName ("elm-runtime-" ++ show version ++ ".js")
48+ mini <- getDataFileName ("elm-runtime-" ++ showVersion version ++ ".js")
4849 compileArgs mini args
4950
5051compileArgs mini (ELM _ [] _ _ _ _ _ _) =
elm/src/Language/Elm.hs+2−1
@@ -16,6 +16,7 @@ module Language.Elm (
1616 runtimeLocation
1717 ) where
1818
19+import Data.Version (showVersion)
1920import CompileToJS
2021import ExtractNoscript
2122import GenerateHtml
@@ -27,7 +28,7 @@ import Paths_Elm
2728import qualified Data.Text as TS
2829import qualified Data.Text.Lazy as TL
2930
30−runtimeLocation = getDataFileName ("elm-runtime-" ++ show version ++ ".js")
31+runtimeLocation = getDataFileName ("elm-runtime-" ++ showVersion version ++ ".js")
3132
3233class ElmSource a where
3334 -- |This function compiles Elm code to three separate parts: HTML, CSS,