From 626826c7eb6fb69f545a2c5a2cf0bd75dc1db9c6 Mon Sep 17 00:00:00 2001 From: "Ian D. Bollinger" Date: Sun, 6 Sep 2015 15:11:03 -0400 Subject: [PATCH 1/6] Remove unused package dependencies Remove unused package dependencies from `elm-reactor.cabal`. --- elm-reactor.cabal | 4 ---- 1 file changed, 4 deletions(-) diff --git a/elm-reactor.cabal b/elm-reactor.cabal index f31a2b9..d5f9f58 100644 --- a/elm-reactor.cabal +++ b/elm-reactor.cabal @@ -73,19 +73,15 @@ Executable elm-reactor blaze-markup, bytestring, cmdargs, - containers >= 0.3, directory >= 1.2, elm-compiler >= 0.15.1 && < 0.16, filepath, fsnotify >= 0.2, - HTTP, mtl, - process, snap-core, snap-server, text, time, transformers, - unordered-containers, websockets >= 0.9 && < 0.10, websockets-snap >= 0.8.2.1 From a8bee5e09d8efc498f24eabd45eff7da0e0a710b Mon Sep 17 00:00:00 2001 From: Evan Czaplicki Date: Mon, 28 Sep 2015 17:48:16 -0700 Subject: [PATCH 2/6] Update for API changes in elm-compiler --- backend/Main.hs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/backend/Main.hs b/backend/Main.hs index 6a57363..13b5e55 100644 --- a/backend/Main.hs +++ b/backend/Main.hs @@ -8,7 +8,6 @@ import Control.Monad (guard) import Control.Monad.Trans (MonadIO(liftIO)) import Data.Maybe (isJust) import qualified Data.ByteString.Char8 as BSC -import qualified Data.Version as Version import qualified Network.WebSockets.Snap as WSS import qualified Text.Blaze.Html5 as H import qualified Text.Blaze.Html.Renderer.Utf8 as Blaze @@ -23,8 +22,8 @@ import Index import qualified Compile import qualified Socket import qualified Utils -import Paths_elm_reactor (version) import qualified Elm.Compiler as Compiler +import qualified Elm.Package as Pkg import Elm.Utils ((|>)) @@ -54,7 +53,7 @@ flags = Flags ] &= versionArg [ explicit, name "version", name "v" - , summary (Version.showVersion version) + , summary (Pkg.versionToString Compiler.version) ] &= summary startupMessage @@ -83,8 +82,7 @@ main = startupMessage :: String startupMessage = - "Elm Reactor " ++ Version.showVersion version - ++ " (Elm Platform " ++ Compiler.version ++ ")" + "elm reactor " ++ Pkg.versionToString Compiler.version directoryConfig :: MonadSnap m => DirectoryConfig m From 444a57b3ab520ccc9e20499cde84334cb219c446 Mon Sep 17 00:00:00 2001 From: Evan Czaplicki Date: Tue, 6 Oct 2015 14:55:05 -0700 Subject: [PATCH 3/6] Bump to 0.16, move constraints to solve for new stuff --- elm-package.json | 8 ++++---- elm-reactor.cabal | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/elm-package.json b/elm-package.json index d2a27fe..b5d55d1 100644 --- a/elm-package.json +++ b/elm-package.json @@ -9,9 +9,9 @@ "exposed-modules": [], "native-modules": true, "dependencies": { - "elm-lang/core": "2.0.0 <= v < 3.0.0", - "evancz/elm-html": "3.0.0 <= v < 4.0.0", - "evancz/elm-markdown": "1.1.4 <= v < 2.0.0" + "elm-lang/core": "3.0.0 <= v < 4.0.0", + "evancz/elm-html": "3.0.0 <= v < 5.0.0", + "evancz/elm-markdown": "1.1.4 <= v < 3.0.0" }, - "elm-version": "0.15.0 <= v < 0.16.0" + "elm-version": "0.16.0 <= v < 0.17.0" } \ No newline at end of file diff --git a/elm-reactor.cabal b/elm-reactor.cabal index d5f9f58..16e0335 100644 --- a/elm-reactor.cabal +++ b/elm-reactor.cabal @@ -1,5 +1,5 @@ Name: elm-reactor -Version: 0.3.2 +Version: 0.16 Synopsis: Interactive development tool for Elm programs @@ -74,7 +74,7 @@ Executable elm-reactor bytestring, cmdargs, directory >= 1.2, - elm-compiler >= 0.15.1 && < 0.16, + elm-compiler >= 0.16 && < 0.17, filepath, fsnotify >= 0.2, mtl, From 4388b01d672d2509321075334fd88f67df1f680a Mon Sep 17 00:00:00 2001 From: Evan Czaplicki Date: Tue, 6 Oct 2015 14:56:48 -0700 Subject: [PATCH 4/6] Update Elm code for 0.16 --- frontend/SideBar/Controls.elm | 16 ++++++++-------- frontend/SideBar/Model.elm | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/frontend/SideBar/Controls.elm b/frontend/SideBar/Controls.elm index 8e8721e..d009858 100644 --- a/frontend/SideBar/Controls.elm +++ b/frontend/SideBar/Controls.elm @@ -5,7 +5,7 @@ import Graphics.Collage exposing (..) import Graphics.Element exposing (..) import Graphics.Input exposing (..) import List -import Signal as S exposing (Signal, (<~), (~)) +import Signal as S exposing (Signal) import Slider exposing (..) import Text @@ -30,9 +30,9 @@ dataStyle typefaces height string = let default = Text.defaultStyle myStyle = { default | - typeface <- typefaces, - color <- lightGrey, - height <- Just height + typeface = typefaces, + color = lightGrey, + height = Just height } in Text.style myStyle (Text.fromString string) @@ -141,9 +141,9 @@ scrubSlider (w,_) state = sliderStyle = { defaultSlider | - length <- sliderLength, - max <- toFloat state.totalEvents, - value <- toFloat state.scrubPosition + length = sliderLength, + max = toFloat state.totalEvents, + value = toFloat state.scrubPosition } in slider (\n -> Signal.message scrubMailbox.address (round n)) sliderStyle @@ -168,7 +168,7 @@ sliderEventText w state = midWidth = toFloat w - sideMargin - textWidthOffset - leftDistance = + leftDistance = case totalEvents of 0 -> sideMargin/2 + textWidthOffset/2 _ -> scrubPosition / totalEvents * midWidth + sideMargin/2 + textWidthOffset/2 diff --git a/frontend/SideBar/Model.elm b/frontend/SideBar/Model.elm index fb36706..83fe44a 100644 --- a/frontend/SideBar/Model.elm +++ b/frontend/SideBar/Model.elm @@ -28,26 +28,26 @@ update action state = case action of Restart -> { state | - totalEvents <- 0, - scrubPosition <- 0 + totalEvents = 0, + scrubPosition = 0 } Pause pause -> { state | - paused <- pause, - totalEvents <- + paused = pause, + totalEvents = if pause then state.totalEvents else state.scrubPosition } TotalEvents n -> { state | - totalEvents <- n, - scrubPosition <- n + totalEvents = n, + scrubPosition = n } ScrubPosition pos -> { state | - scrubPosition <- pos, - paused <- True + scrubPosition = pos, + paused = True } From a6560c2659102a8c2b793b7786950754550faaf9 Mon Sep 17 00:00:00 2001 From: Evan Czaplicki Date: Fri, 9 Oct 2015 19:51:41 -0700 Subject: [PATCH 5/6] Add flag to definitely put output in elm.js Needed after changes to default file output of elm-make --- backend/Compile.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/Compile.hs b/backend/Compile.hs index e90e8d6..afc77f9 100644 --- a/backend/Compile.hs +++ b/backend/Compile.hs @@ -19,7 +19,7 @@ import qualified Elm.Utils as Utils compile :: FilePath -> IO (Either String String) compile filePath = - do result <- Utils.unwrappedRun "elm-make" [ "--yes", filePath ] + do result <- Utils.unwrappedRun "elm-make" [ "--yes", filePath, "--output=elm.js" ] case result of Left (Utils.MissingExe msg) -> return (Left msg) From ff4ad13ea6b55c63b2d2099b738fd1d5ec2d29b4 Mon Sep 17 00:00:00 2001 From: Evan Czaplicki Date: Fri, 23 Oct 2015 14:12:01 -0700 Subject: [PATCH 6/6] Update for elm-compiler API changes --- backend/Compile.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/Compile.hs b/backend/Compile.hs index afc77f9..d5945e7 100644 --- a/backend/Compile.hs +++ b/backend/Compile.hs @@ -41,7 +41,7 @@ getName filePath sourceCode = Left errors -> let toString err = - Compiler.errorToString Compiler.dummyDealiaser filePath sourceCode err + Compiler.errorToString Compiler.dummyLocalizer filePath sourceCode err in Left (concatMap toString errors)