Elm 0.16 with stack

I just noticed that there’s been a new release of the elm tools. The previous release was fairly easy to build using stack, but this release made it a little bit easier still.

The script for cloning should be modified to look like this:

#! /usr/bin/zsh

repos=("git clone -b 0.16 https://github.com/elm-lang/elm-compiler.git"
       "git clone -b 0.16 https://github.com/elm-lang/elm-package.git"
       "git clone -b 0.16 https://github.com/elm-lang/elm-make.git"
       "git clone -b 0.16 https://github.com/elm-lang/elm-reactor.git"
       "git clone -b 0.16 https://github.com/elm-lang/elm-repl.git"

for r in ${repos[@]}; do
    eval ${r}

When creating the inital stack.yaml tell stack to use release 7.10.2 of ghc:

% stack init --resolver ghc-7.10.2

That makes it possible to use the installed version of ghc. It’s also unecessary to provide any flag for aeson, which means there’s no need for any manual changed to stack.yaml prior to running (add --install-ghc if you don’t have it on your system already)

% stack solver --modify-stack-yaml

Now just build and install as before:

% stack install elm-{compiler,make,package,repl}
% stack install elm-reactor

That’s it!

⟸ How can I unit test failure cases? Trick for pre-processing source in CMake ⟹
Leave a comment