Merge pull request #75 from tgecho/elm-0.17

Update to support Elm 0.17
This commit is contained in:
Erik Simmler 2016-05-14 19:06:53 -04:00
commit b3d36f3249
150 changed files with 404 additions and 337 deletions

1
.gitignore vendored
View file

@ -4,3 +4,4 @@ bin/configlet
bin/configlet.exe bin/configlet.exe
elm-stuff elm-stuff
CHECKLIST CHECKLIST
build.js

View file

@ -7,7 +7,7 @@ sudo: false
install: install:
- nvm install 0.12 - nvm install 0.12
- nvm use 0.12 - nvm use 0.12
- npm install -g elm@0.16.0 elm-test@0.16.0 - npm install -g elm@0.17.0 elm-test@0.16.1-alpha4
- elm package install -y - elm package install -y
script: script:

View file

@ -44,7 +44,7 @@ Please keep the following in mind:
- Each exercise should have a test suite, an example solution, a template file for the real implementation and an `elm-package.json` file with the `elm-test` and `elm-console` dependencies. The CI build expects files to be named using the following convention. The example solution should be named `ExerciseModuleName.example`. The template file should be named `ExerciseModuleName.elm`. Test file should be named `ExerciseModuleNameTest.elm`. - Each exercise should have a test suite, an example solution, a template file for the real implementation and an `elm-package.json` file with the `elm-test` and `elm-console` dependencies. The CI build expects files to be named using the following convention. The example solution should be named `ExerciseModuleName.example`. The template file should be named `ExerciseModuleName.elm`. Test file should be named `ExerciseModuleNameTest.elm`.
- The recommended workflow when working on an exercise is to first create the implementation and test files, `ExerciseModuleName.elm` and `ExerciseModuleNameTest.elm`. - The recommended workflow when working on an exercise is to first create the implementation and test files, `ExerciseModuleName.elm` and `ExerciseModuleNameTest.elm`.
- Test the new exercise directly by running `elm-test exercises/exercise_module_name/ExerciseModuleNameTest.elm`. - Test the new exercise directly by running `elm-test exercises/exercise_module_name/ExerciseModuleNameTest.elm`.
- Once the implementation of the exercise is complete, move `ExerciseModuleName.elm` to `ExerciseModuleName.example` and create the template file. - Once the implementation of the exercise is complete, move `ExerciseModuleName.elm` to `ExerciseModuleName.example` and create the template file.
@ -57,10 +57,8 @@ Please keep the following in mind:
- Test files should use the following format: - Test files should use the following format:
```elm ```elm
module Main (..) where module Main exposing (..)
import Task
import Console
import ElmTest exposing (..) import ElmTest exposing (..)
@ -73,9 +71,9 @@ tests =
] ]
port runner : Signal (Task.Task x ()) main : Program Never
port runner = main =
Console.run (consoleRunner tests) runSuite tests
``` ```
- All the tests for xElm exercises can be run from the top level of the repo with `bin/build.sh`. Please run this command before submitting your PR. - All the tests for xElm exercises can be run from the top level of the repo with `bin/build.sh`. Please run this command before submitting your PR.

View file

@ -11,7 +11,8 @@ do
mv "$exercise_dir/$exercise.example" "$exercise_dir/$exercise.elm" mv "$exercise_dir/$exercise.example" "$exercise_dir/$exercise.elm"
echo '-------------------------------------------------------' echo '-------------------------------------------------------'
echo "Testing $exercise" echo "Testing $exercise"
elm-test $exercise_dir/*Tests.elm
elm-make $exercise_dir/*Tests.elm --yes --output build.js && node build.js
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
TEST_RESULT=1 TEST_RESULT=1

View file

@ -2,8 +2,8 @@
The simplest way to install Elm is via Node.js/NPM. The simplest way to install Elm is via Node.js/NPM.
If you don't already have Node.js installed on your computer, you can download it from [the official site](https://nodejs.org/). Once you have Node.js up and running, follow these steps to install the Elm platform and elm-test. If you don't already have Node.js installed on your computer, you can download it from [the official site](https://nodejs.org/). Once you have Node.js up and running, follow these steps to install the Elm platform.
```bash ```bash
$ npm install --global elm elm-test $ npm install --global elm
``` ```

View file

@ -1,12 +1,10 @@
Elm exercises within your exercism project directory can be run by changing to the exercise directory, and running `elm-test NameOfTests.elm`. Elm exercises within your exercism project directory can be run by changing to the exercise directory, and running `./runtests.sh` (or `runtests.bat` on Windows).
```bash ```bash
$ cd exercism/project/directory/elm/hello-world $ cd exercism/project/directory/elm/hello-world
$ elm-test HelloWorldTests.elm $ ./runtests.sh
``` ```
When you first run `elm-test` for an exercise it will prompt you to install the test library dependencies. If you type "y" and hit enter, the script should take care of the rest.
## Hints and tips ## Hints and tips
### Coding the exercise ### Coding the exercise

View file

@ -1,5 +1,5 @@
{ {
"version": "1.0.0", "version": "2.0.0",
"summary": "Exercism problems in Elm.", "summary": "Exercism problems in Elm.",
"repository": "https://github.com/exercism/xelm.git", "repository": "https://github.com/exercism/xelm.git",
"license": "BSD3", "license": "BSD3",
@ -32,10 +32,8 @@
], ],
"exposed-modules": [], "exposed-modules": [],
"dependencies": { "dependencies": {
"NoRedInk/elm-check": "3.0.0 <= v < 4.0.0", "elm-community/elm-test": "1.0.0 <= v < 2.0.0",
"deadfoxygrandpa/elm-test": "3.0.1 <= v < 4.0.0", "elm-lang/core": "4.0.0 <= v < 5.0.0"
"elm-lang/core": "2.0.0 <= v < 4.0.0",
"laszlopandy/elm-console": "1.1.0 <= v < 2.0.0"
}, },
"elm-version": "0.15.0 <= v < 0.17.0" "elm-version": "0.17.0 <= v < 0.18.0"
} }

View file

@ -1 +1 @@
module Accumulate (..) where module Accumulate exposing (..)

View file

@ -1,4 +1,4 @@
module Accumulate (..) where module Accumulate exposing (..)
accumulate : (a -> b) -> List a -> List b accumulate : (a -> b) -> List a -> List b

View file

@ -1,7 +1,5 @@
module Main (..) where module Main exposing (..)
import Task
import Console
import ElmTest exposing (..) import ElmTest exposing (..)
import Accumulate exposing (accumulate) import Accumulate exposing (accumulate)
import String import String
@ -31,6 +29,6 @@ tests =
] ]
port runner : Signal (Task.Task x ()) main : Program Never
port runner = main =
Console.run (consoleRunner tests) runSuite tests

View file

@ -1,5 +1,5 @@
{ {
"version": "1.0.0", "version": "2.0.0",
"summary": "Exercism problems in Elm.", "summary": "Exercism problems in Elm.",
"repository": "https://github.com/exercism/xelm.git", "repository": "https://github.com/exercism/xelm.git",
"license": "BSD3", "license": "BSD3",
@ -8,9 +8,8 @@
], ],
"exposed-modules": [], "exposed-modules": [],
"dependencies": { "dependencies": {
"deadfoxygrandpa/elm-test": "3.0.1 <= v < 4.0.0", "elm-community/elm-test": "1.0.0 <= v < 2.0.0",
"elm-lang/core": "2.0.0 <= v < 4.0.0", "elm-lang/core": "4.0.0 <= v < 5.0.0"
"laszlopandy/elm-console": "1.1.0 <= v < 2.0.0"
}, },
"elm-version": "0.15.0 <= v < 0.17.0" "elm-version": "0.17.0 <= v < 0.18.0"
} }

View file

@ -0,0 +1,4 @@
@echo off
for %%f in (*Tests.elm) do (
elm-make %%f --yes --output build.js && node build.js
)

View file

@ -0,0 +1,2 @@
#!/usr/bin/env bash
elm-make *Tests.elm --yes --output build.js && node build.js

View file

@ -1 +1 @@
module Allergies (..) where module Allergies exposing (..)

View file

@ -1,4 +1,4 @@
module Allergies (..) where module Allergies exposing (..)
import List import List
import Bitwise import Bitwise

View file

@ -1,7 +1,5 @@
module Main (..) where module Main exposing (..)
import Task
import Console
import ElmTest exposing (..) import ElmTest exposing (..)
import Allergies exposing (isAllergicTo, toList) import Allergies exposing (isAllergicTo, toList)
import List import List
@ -68,6 +66,6 @@ tests =
] ]
port runner : Signal (Task.Task x ()) main : Program Never
port runner = main =
Console.run (consoleRunner tests) runSuite tests

View file

@ -1,5 +1,5 @@
{ {
"version": "1.0.0", "version": "2.0.0",
"summary": "Exercism problems in Elm.", "summary": "Exercism problems in Elm.",
"repository": "https://github.com/exercism/xelm.git", "repository": "https://github.com/exercism/xelm.git",
"license": "BSD3", "license": "BSD3",
@ -8,9 +8,8 @@
], ],
"exposed-modules": [], "exposed-modules": [],
"dependencies": { "dependencies": {
"deadfoxygrandpa/elm-test": "3.0.1 <= v < 4.0.0", "elm-community/elm-test": "1.0.0 <= v < 2.0.0",
"elm-lang/core": "2.0.0 <= v < 4.0.0", "elm-lang/core": "4.0.0 <= v < 5.0.0"
"laszlopandy/elm-console": "1.1.0 <= v < 2.0.0"
}, },
"elm-version": "0.15.0 <= v < 0.17.0" "elm-version": "0.17.0 <= v < 0.18.0"
} }

View file

@ -0,0 +1,4 @@
@echo off
for %%f in (*Tests.elm) do (
elm-make %%f --yes --output build.js && node build.js
)

View file

@ -0,0 +1,2 @@
#!/usr/bin/env bash
elm-make *Tests.elm --yes --output build.js && node build.js

View file

@ -1 +1 @@
module Anagram (..) where module Anagram exposing (..)

View file

@ -1,4 +1,4 @@
module Anagram (..) where module Anagram exposing (..)
import String exposing (toLower, toList) import String exposing (toLower, toList)

View file

@ -1,7 +1,5 @@
module Main (..) where module Main exposing (..)
import Task
import Console
import ElmTest exposing (..) import ElmTest exposing (..)
import Anagram exposing (detect) import Anagram exposing (detect)
@ -133,6 +131,6 @@ tests =
] ]
port runner : Signal (Task.Task x ()) main : Program Never
port runner = main =
Console.run (consoleRunner tests) runSuite tests

View file

@ -1,5 +1,5 @@
{ {
"version": "1.0.0", "version": "2.0.0",
"summary": "Exercism problems in Elm.", "summary": "Exercism problems in Elm.",
"repository": "https://github.com/exercism/xelm.git", "repository": "https://github.com/exercism/xelm.git",
"license": "BSD3", "license": "BSD3",
@ -8,9 +8,8 @@
], ],
"exposed-modules": [], "exposed-modules": [],
"dependencies": { "dependencies": {
"deadfoxygrandpa/elm-test": "3.0.1 <= v < 4.0.0", "elm-community/elm-test": "1.0.0 <= v < 2.0.0",
"elm-lang/core": "2.0.0 <= v < 4.0.0", "elm-lang/core": "4.0.0 <= v < 5.0.0"
"laszlopandy/elm-console": "1.1.0 <= v < 2.0.0"
}, },
"elm-version": "0.15.0 <= v < 0.17.0" "elm-version": "0.17.0 <= v < 0.18.0"
} }

4
exercises/anagram/runtests.bat Executable file
View file

@ -0,0 +1,4 @@
@echo off
for %%f in (*Tests.elm) do (
elm-make %%f --yes --output build.js && node build.js
)

2
exercises/anagram/runtests.sh Executable file
View file

@ -0,0 +1,2 @@
#!/usr/bin/env bash
elm-make *Tests.elm --yes --output build.js && node build.js

View file

@ -1,4 +1,4 @@
module Bob (..) where module Bob exposing (..)
import String import String
import Regex import Regex

View file

@ -1,7 +1,5 @@
module Main (..) where module Main exposing (..)
import Task
import Console
import ElmTest exposing (..) import ElmTest exposing (..)
import String import String
import Char import Char
@ -58,7 +56,7 @@ listOfCharacters length characterList =
gibberish : Int -> Random.Generator Char -> String gibberish : Int -> Random.Generator Char -> String
gibberish length characterList = gibberish length characterList =
fst (Random.generate (Random.map String.fromList (listOfCharacters length characterList)) (Random.initialSeed 424242)) fst (Random.step (Random.map String.fromList (listOfCharacters length characterList)) (Random.initialSeed 424242))
uppercaseGibberish : Int -> String uppercaseGibberish : Int -> String
@ -71,6 +69,6 @@ gibberishQuestion length =
(gibberish length anyCharacter) ++ "?" (gibberish length anyCharacter) ++ "?"
port runner : Signal (Task.Task x ()) main : Program Never
port runner = main =
Console.run (consoleRunner tests) runSuite tests

View file

@ -1,5 +1,5 @@
{ {
"version": "1.0.0", "version": "2.0.0",
"summary": "Exercism problems in Elm.", "summary": "Exercism problems in Elm.",
"repository": "https://github.com/exercism/xelm.git", "repository": "https://github.com/exercism/xelm.git",
"license": "BSD3", "license": "BSD3",
@ -8,9 +8,8 @@
], ],
"exposed-modules": [], "exposed-modules": [],
"dependencies": { "dependencies": {
"deadfoxygrandpa/elm-test": "3.0.1 <= v < 4.0.0", "elm-community/elm-test": "1.0.0 <= v < 2.0.0",
"elm-lang/core": "2.0.0 <= v < 4.0.0", "elm-lang/core": "4.0.0 <= v < 5.0.0"
"laszlopandy/elm-console": "1.1.0 <= v < 2.0.0"
}, },
"elm-version": "0.15.0 <= v < 0.17.0" "elm-version": "0.17.0 <= v < 0.18.0"
} }

4
exercises/bob/runtests.bat Executable file
View file

@ -0,0 +1,4 @@
@echo off
for %%f in (*Tests.elm) do (
elm-make %%f --yes --output build.js && node build.js
)

2
exercises/bob/runtests.sh Executable file
View file

@ -0,0 +1,2 @@
#!/usr/bin/env bash
elm-make *Tests.elm --yes --output build.js && node build.js

View file

@ -1 +1 @@
module DifferenceOfSquares (..) where module DifferenceOfSquares exposing (..)

View file

@ -1,4 +1,4 @@
module DifferenceOfSquares (..) where module DifferenceOfSquares exposing (..)
squareOfSum : Int -> Int squareOfSum : Int -> Int

View file

@ -1,7 +1,5 @@
module Main (..) where module Main exposing (..)
import Task
import Console
import ElmTest exposing (..) import ElmTest exposing (..)
import DifferenceOfSquares exposing (squareOfSum, sumOfSquares, difference) import DifferenceOfSquares exposing (squareOfSum, sumOfSquares, difference)
@ -32,6 +30,6 @@ tests =
] ]
port runner : Signal (Task.Task x ()) main : Program Never
port runner = main =
Console.run (consoleRunner tests) runSuite tests

View file

@ -1,5 +1,5 @@
{ {
"version": "1.0.0", "version": "2.0.0",
"summary": "Exercism problems in Elm.", "summary": "Exercism problems in Elm.",
"repository": "https://github.com/exercism/xelm.git", "repository": "https://github.com/exercism/xelm.git",
"license": "BSD3", "license": "BSD3",
@ -8,9 +8,8 @@
], ],
"exposed-modules": [], "exposed-modules": [],
"dependencies": { "dependencies": {
"deadfoxygrandpa/elm-test": "3.0.1 <= v < 4.0.0", "elm-community/elm-test": "1.0.0 <= v < 2.0.0",
"elm-lang/core": "2.0.0 <= v < 4.0.0", "elm-lang/core": "4.0.0 <= v < 5.0.0"
"laszlopandy/elm-console": "1.1.0 <= v < 2.0.0"
}, },
"elm-version": "0.15.0 <= v < 0.17.0" "elm-version": "0.17.0 <= v < 0.18.0"
} }

View file

@ -0,0 +1,4 @@
@echo off
for %%f in (*Tests.elm) do (
elm-make %%f --yes --output build.js && node build.js
)

View file

@ -0,0 +1,2 @@
#!/usr/bin/env bash
elm-make *Tests.elm --yes --output build.js && node build.js

View file

@ -1,2 +1,2 @@
module GradeSchool (..) where module GradeSchool exposing (..)

View file

@ -1,4 +1,4 @@
module GradeSchool (..) where module GradeSchool exposing (..)
import Dict exposing (..) import Dict exposing (..)

View file

@ -1,7 +1,5 @@
module Main (..) where module Main exposing (..)
import Task
import Console
import ElmTest exposing (..) import ElmTest exposing (..)
import GradeSchool exposing (addStudent, studentsInGrade, allStudents) import GradeSchool exposing (addStudent, studentsInGrade, allStudents)
@ -72,6 +70,6 @@ tests =
] ]
port runner : Signal (Task.Task x ()) main : Program Never
port runner = main =
Console.run (consoleRunner tests) runSuite tests

View file

@ -1,5 +1,5 @@
{ {
"version": "1.0.0", "version": "2.0.0",
"summary": "Exercism problems in Elm.", "summary": "Exercism problems in Elm.",
"repository": "https://github.com/exercism/xelm.git", "repository": "https://github.com/exercism/xelm.git",
"license": "BSD3", "license": "BSD3",
@ -8,9 +8,8 @@
], ],
"exposed-modules": [], "exposed-modules": [],
"dependencies": { "dependencies": {
"deadfoxygrandpa/elm-test": "3.0.1 <= v < 4.0.0", "elm-community/elm-test": "1.0.0 <= v < 2.0.0",
"elm-lang/core": "2.0.0 <= v < 4.0.0", "elm-lang/core": "4.0.0 <= v < 5.0.0"
"laszlopandy/elm-console": "1.1.0 <= v < 2.0.0"
}, },
"elm-version": "0.15.0 <= v < 0.17.0" "elm-version": "0.17.0 <= v < 0.18.0"
} }

View file

@ -0,0 +1,4 @@
@echo off
for %%f in (*Tests.elm) do (
elm-make %%f --yes --output build.js && node build.js
)

View file

@ -0,0 +1,2 @@
#!/usr/bin/env bash
elm-make *Tests.elm --yes --output build.js && node build.js

View file

@ -1 +1 @@
module Hamming (..) where module Hamming exposing (..)

View file

@ -1,4 +1,4 @@
module Hamming (..) where module Hamming exposing (..)
import String exposing (length, toList) import String exposing (length, toList)

View file

@ -1,7 +1,5 @@
module Main (..) where module Main exposing (..)
import Task
import Console
import ElmTest exposing (..) import ElmTest exposing (..)
import Hamming exposing (distance) import Hamming exposing (distance)
@ -55,6 +53,6 @@ tests =
] ]
port runner : Signal (Task.Task x ()) main : Program Never
port runner = main =
Console.run (consoleRunner tests) runSuite tests

View file

@ -1,5 +1,5 @@
{ {
"version": "1.0.0", "version": "2.0.0",
"summary": "Exercism problems in Elm.", "summary": "Exercism problems in Elm.",
"repository": "https://github.com/exercism/xelm.git", "repository": "https://github.com/exercism/xelm.git",
"license": "BSD3", "license": "BSD3",
@ -8,9 +8,8 @@
], ],
"exposed-modules": [], "exposed-modules": [],
"dependencies": { "dependencies": {
"deadfoxygrandpa/elm-test": "3.0.1 <= v < 4.0.0", "elm-community/elm-test": "1.0.0 <= v < 2.0.0",
"elm-lang/core": "2.0.0 <= v < 4.0.0", "elm-lang/core": "4.0.0 <= v < 5.0.0"
"laszlopandy/elm-console": "1.1.0 <= v < 2.0.0"
}, },
"elm-version": "0.15.0 <= v < 0.17.0" "elm-version": "0.17.0 <= v < 0.18.0"
} }

4
exercises/hamming/runtests.bat Executable file
View file

@ -0,0 +1,4 @@
@echo off
for %%f in (*Tests.elm) do (
elm-make %%f --yes --output build.js && node build.js
)

2
exercises/hamming/runtests.sh Executable file
View file

@ -0,0 +1,2 @@
#!/usr/bin/env bash
elm-make *Tests.elm --yes --output build.js && node build.js

View file

@ -7,7 +7,7 @@ file. It has to stay just the way it is.
-} -}
module HelloWorld (..) where module HelloWorld exposing (..)
-- It's good style to include a types at the top level of your modules. -- It's good style to include a types at the top level of your modules.

View file

@ -1,4 +1,4 @@
module HelloWorld (..) where module HelloWorld exposing (..)
helloWorld : Maybe String -> String helloWorld : Maybe String -> String

View file

@ -1,7 +1,5 @@
module Main (..) where module Main exposing (..)
import Task
import Console
import ElmTest exposing (..) import ElmTest exposing (..)
import HelloWorld exposing (helloWorld) import HelloWorld exposing (helloWorld)
@ -16,6 +14,6 @@ tests =
] ]
port runner : Signal (Task.Task x ()) main : Program Never
port runner = main =
Console.run (consoleRunner tests) runSuite tests

View file

@ -1,5 +1,5 @@
{ {
"version": "1.0.0", "version": "2.0.0",
"summary": "Exercism problems in Elm.", "summary": "Exercism problems in Elm.",
"repository": "https://github.com/exercism/xelm.git", "repository": "https://github.com/exercism/xelm.git",
"license": "BSD3", "license": "BSD3",
@ -8,9 +8,8 @@
], ],
"exposed-modules": [], "exposed-modules": [],
"dependencies": { "dependencies": {
"deadfoxygrandpa/elm-test": "3.0.1 <= v < 4.0.0", "elm-community/elm-test": "1.0.0 <= v < 2.0.0",
"elm-lang/core": "2.0.0 <= v < 4.0.0", "elm-lang/core": "4.0.0 <= v < 5.0.0"
"laszlopandy/elm-console": "1.1.0 <= v < 2.0.0"
}, },
"elm-version": "0.15.0 <= v < 0.17.0" "elm-version": "0.17.0 <= v < 0.18.0"
} }

View file

@ -0,0 +1,4 @@
@echo off
for %%f in (*Tests.elm) do (
elm-make %%f --yes --output build.js && node build.js
)

View file

@ -0,0 +1,2 @@
#!/usr/bin/env bash
elm-make *Tests.elm --yes --output build.js && node build.js

View file

@ -1 +1 @@
module Leap (..) where module Leap exposing (..)

View file

@ -1,4 +1,4 @@
module Leap (..) where module Leap exposing (..)
isLeapYear : Int -> Bool isLeapYear : Int -> Bool

View file

@ -1,7 +1,5 @@
module Main (..) where module Main exposing (..)
import Task
import Console
import ElmTest exposing (..) import ElmTest exposing (..)
import Leap import Leap
@ -20,6 +18,6 @@ tests =
] ]
port runner : Signal (Task.Task x ()) main : Program Never
port runner = main =
Console.run (consoleRunner tests) runSuite tests

View file

@ -1,5 +1,5 @@
{ {
"version": "1.0.0", "version": "2.0.0",
"summary": "Exercism problems in Elm.", "summary": "Exercism problems in Elm.",
"repository": "https://github.com/exercism/xelm.git", "repository": "https://github.com/exercism/xelm.git",
"license": "BSD3", "license": "BSD3",
@ -8,9 +8,8 @@
], ],
"exposed-modules": [], "exposed-modules": [],
"dependencies": { "dependencies": {
"deadfoxygrandpa/elm-test": "3.0.1 <= v < 4.0.0", "elm-community/elm-test": "1.0.0 <= v < 2.0.0",
"elm-lang/core": "2.0.0 <= v < 4.0.0", "elm-lang/core": "4.0.0 <= v < 5.0.0"
"laszlopandy/elm-console": "1.1.0 <= v < 2.0.0"
}, },
"elm-version": "0.15.0 <= v < 0.17.0" "elm-version": "0.17.0 <= v < 0.18.0"
} }

4
exercises/leap/runtests.bat Executable file
View file

@ -0,0 +1,4 @@
@echo off
for %%f in (*Tests.elm) do (
elm-make %%f --yes --output build.js && node build.js
)

2
exercises/leap/runtests.sh Executable file
View file

@ -0,0 +1,2 @@
#!/usr/bin/env bash
elm-make *Tests.elm --yes --output build.js && node build.js

View file

@ -1 +1 @@
module ListOps (..) where module ListOps exposing (..)

View file

@ -1,4 +1,4 @@
module ListOps (..) where module ListOps exposing (..)
length : List a -> Int length : List a -> Int

View file

@ -1,7 +1,5 @@
module Main (..) where module Main exposing (..)
import Task
import Console
import ElmTest exposing (..) import ElmTest exposing (..)
import ListOps exposing (..) import ListOps exposing (..)
@ -63,6 +61,6 @@ tests =
] ]
port runner : Signal (Task.Task x ()) main : Program Never
port runner = main =
Console.run (consoleRunner tests) runSuite tests

View file

@ -1,5 +1,5 @@
{ {
"version": "1.0.0", "version": "2.0.0",
"summary": "Exercism problems in Elm.", "summary": "Exercism problems in Elm.",
"repository": "https://github.com/exercism/xelm.git", "repository": "https://github.com/exercism/xelm.git",
"license": "BSD3", "license": "BSD3",
@ -8,9 +8,8 @@
], ],
"exposed-modules": [], "exposed-modules": [],
"dependencies": { "dependencies": {
"deadfoxygrandpa/elm-test": "3.0.1 <= v < 4.0.0", "elm-community/elm-test": "1.0.0 <= v < 2.0.0",
"elm-lang/core": "2.0.0 <= v < 4.0.0", "elm-lang/core": "4.0.0 <= v < 5.0.0"
"laszlopandy/elm-console": "1.1.0 <= v < 2.0.0"
}, },
"elm-version": "0.15.0 <= v < 0.17.0" "elm-version": "0.17.0 <= v < 0.18.0"
} }

View file

@ -0,0 +1,4 @@
@echo off
for %%f in (*Tests.elm) do (
elm-make %%f --yes --output build.js && node build.js
)

2
exercises/list-ops/runtests.sh Executable file
View file

@ -0,0 +1,2 @@
#!/usr/bin/env bash
elm-make *Tests.elm --yes --output build.js && node build.js

View file

@ -1,4 +1,4 @@
module NucleotideCount (..) where module NucleotideCount exposing (..)
version : Int version : Int

View file

@ -1,4 +1,4 @@
module NucleotideCount (..) where module NucleotideCount exposing (..)
import String import String

View file

@ -1,7 +1,5 @@
module Main (..) where module Main exposing (..)
import Task
import Console
import ElmTest exposing (..) import ElmTest exposing (..)
import NucleotideCount exposing (nucleotideCounts, version) import NucleotideCount exposing (nucleotideCounts, version)
@ -34,6 +32,6 @@ tests =
] ]
port runner : Signal (Task.Task x ()) main : Program Never
port runner = main =
Console.run (consoleRunner tests) runSuite tests

View file

@ -1,5 +1,5 @@
{ {
"version": "1.0.0", "version": "2.0.0",
"summary": "Exercism problems in Elm.", "summary": "Exercism problems in Elm.",
"repository": "https://github.com/exercism/xelm.git", "repository": "https://github.com/exercism/xelm.git",
"license": "BSD3", "license": "BSD3",
@ -8,9 +8,8 @@
], ],
"exposed-modules": [], "exposed-modules": [],
"dependencies": { "dependencies": {
"deadfoxygrandpa/elm-test": "3.0.1 <= v < 4.0.0", "elm-community/elm-test": "1.0.0 <= v < 2.0.0",
"elm-lang/core": "2.0.0 <= v < 4.0.0", "elm-lang/core": "4.0.0 <= v < 5.0.0"
"laszlopandy/elm-console": "1.1.0 <= v < 2.0.0"
}, },
"elm-version": "0.15.0 <= v < 0.17.0" "elm-version": "0.17.0 <= v < 0.18.0"
} }

View file

@ -0,0 +1,4 @@
@echo off
for %%f in (*Tests.elm) do (
elm-make %%f --yes --output build.js && node build.js
)

View file

@ -0,0 +1,2 @@
#!/usr/bin/env bash
elm-make *Tests.elm --yes --output build.js && node build.js

View file

@ -1,4 +1,4 @@
module Pangram (..) where module Pangram exposing (..)
import String exposing (toLower, contains, fromChar) import String exposing (toLower, contains, fromChar)

View file

@ -1,7 +1,5 @@
module Main (..) where module Main exposing (..)
import Task
import Console
import ElmTest exposing (..) import ElmTest exposing (..)
import Pangram exposing (isPangram) import Pangram exposing (isPangram)
@ -43,6 +41,6 @@ tests =
] ]
port runner : Signal (Task.Task x ()) main : Program Never
port runner = main =
Console.run (consoleRunner tests) runSuite tests

View file

@ -1,5 +1,5 @@
{ {
"version": "1.0.0", "version": "2.0.0",
"summary": "Exercism problems in Elm.", "summary": "Exercism problems in Elm.",
"repository": "https://github.com/exercism/xelm.git", "repository": "https://github.com/exercism/xelm.git",
"license": "BSD3", "license": "BSD3",
@ -8,9 +8,8 @@
], ],
"exposed-modules": [], "exposed-modules": [],
"dependencies": { "dependencies": {
"deadfoxygrandpa/elm-test": "3.0.1 <= v < 4.0.0", "elm-community/elm-test": "1.0.0 <= v < 2.0.0",
"elm-lang/core": "2.0.0 <= v < 4.0.0", "elm-lang/core": "4.0.0 <= v < 5.0.0"
"laszlopandy/elm-console": "1.1.0 <= v < 2.0.0"
}, },
"elm-version": "0.15.0 <= v < 0.17.0" "elm-version": "0.17.0 <= v < 0.18.0"
} }

4
exercises/pangram/runtests.bat Executable file
View file

@ -0,0 +1,4 @@
@echo off
for %%f in (*Tests.elm) do (
elm-make %%f --yes --output build.js && node build.js
)

2
exercises/pangram/runtests.sh Executable file
View file

@ -0,0 +1,2 @@
#!/usr/bin/env bash
elm-make *Tests.elm --yes --output build.js && node build.js

View file

@ -1 +1 @@
module PhoneNumber (..) where module PhoneNumber exposing (..)

View file

@ -1,4 +1,4 @@
module PhoneNumber (..) where module PhoneNumber exposing (..)
import String import String

View file

@ -1,7 +1,5 @@
module Main (..) where module Main exposing (..)
import Task
import Console
import ElmTest exposing (..) import ElmTest exposing (..)
import PhoneNumber exposing (getNumber, prettyPrint) import PhoneNumber exposing (getNumber, prettyPrint)
@ -49,6 +47,6 @@ tests =
] ]
port runner : Signal (Task.Task x ()) main : Program Never
port runner = main =
Console.run (consoleRunner tests) runSuite tests

View file

@ -1,5 +1,5 @@
{ {
"version": "1.0.0", "version": "2.0.0",
"summary": "Exercism problems in Elm.", "summary": "Exercism problems in Elm.",
"repository": "https://github.com/exercism/xelm.git", "repository": "https://github.com/exercism/xelm.git",
"license": "BSD3", "license": "BSD3",
@ -8,9 +8,8 @@
], ],
"exposed-modules": [], "exposed-modules": [],
"dependencies": { "dependencies": {
"deadfoxygrandpa/elm-test": "3.0.1 <= v < 4.0.0", "elm-community/elm-test": "1.0.0 <= v < 2.0.0",
"elm-lang/core": "2.0.0 <= v < 4.0.0", "elm-lang/core": "4.0.0 <= v < 5.0.0"
"laszlopandy/elm-console": "1.1.0 <= v < 2.0.0"
}, },
"elm-version": "0.15.0 <= v < 0.17.0" "elm-version": "0.17.0 <= v < 0.18.0"
} }

View file

@ -0,0 +1,4 @@
@echo off
for %%f in (*Tests.elm) do (
elm-make %%f --yes --output build.js && node build.js
)

View file

@ -0,0 +1,2 @@
#!/usr/bin/env bash
elm-make *Tests.elm --yes --output build.js && node build.js

View file

@ -1 +1 @@
module Raindrops (..) where module Raindrops exposing (..)

View file

@ -1,4 +1,4 @@
module Raindrops (..) where module Raindrops exposing (..)
import String import String

View file

@ -1,7 +1,5 @@
module Main (..) where module Main exposing (..)
import Task
import Console
import ElmTest exposing (..) import ElmTest exposing (..)
import Raindrops exposing (raindrops) import Raindrops exposing (raindrops)
@ -28,6 +26,6 @@ tests =
] ]
port runner : Signal (Task.Task x ()) main : Program Never
port runner = main =
Console.run (consoleRunner tests) runSuite tests

View file

@ -1,5 +1,5 @@
{ {
"version": "1.0.0", "version": "2.0.0",
"summary": "Exercism problems in Elm.", "summary": "Exercism problems in Elm.",
"repository": "https://github.com/exercism/xelm.git", "repository": "https://github.com/exercism/xelm.git",
"license": "BSD3", "license": "BSD3",
@ -8,9 +8,8 @@
], ],
"exposed-modules": [], "exposed-modules": [],
"dependencies": { "dependencies": {
"deadfoxygrandpa/elm-test": "3.0.1 <= v < 4.0.0", "elm-community/elm-test": "1.0.0 <= v < 2.0.0",
"elm-lang/core": "2.0.0 <= v < 4.0.0", "elm-lang/core": "4.0.0 <= v < 5.0.0"
"laszlopandy/elm-console": "1.1.0 <= v < 2.0.0"
}, },
"elm-version": "0.15.0 <= v < 0.17.0" "elm-version": "0.17.0 <= v < 0.18.0"
} }

View file

@ -0,0 +1,4 @@
@echo off
for %%f in (*Tests.elm) do (
elm-make %%f --yes --output build.js && node build.js
)

View file

@ -0,0 +1,2 @@
#!/usr/bin/env bash
elm-make *Tests.elm --yes --output build.js && node build.js

View file

@ -1 +1 @@
module RNATranscription (..) where module RNATranscription exposing (..)

View file

@ -1,4 +1,4 @@
module RNATranscription (toRNA) where module RNATranscription exposing (toRNA)
import String import String

View file

@ -1,7 +1,5 @@
module Main (..) where module Main exposing (..)
import Task
import Console
import ElmTest exposing (..) import ElmTest exposing (..)
import RNATranscription exposing (toRNA) import RNATranscription exposing (toRNA)
@ -34,6 +32,6 @@ tests =
] ]
port runner : Signal (Task.Task x ()) main : Program Never
port runner = main =
Console.run (consoleRunner tests) runSuite tests

View file

@ -1,5 +1,5 @@
{ {
"version": "1.0.0", "version": "2.0.0",
"summary": "Exercism problems in Elm.", "summary": "Exercism problems in Elm.",
"repository": "https://github.com/exercism/xelm.git", "repository": "https://github.com/exercism/xelm.git",
"license": "BSD3", "license": "BSD3",
@ -8,9 +8,8 @@
], ],
"exposed-modules": [], "exposed-modules": [],
"dependencies": { "dependencies": {
"deadfoxygrandpa/elm-test": "3.0.1 <= v < 4.0.0", "elm-community/elm-test": "1.0.0 <= v < 2.0.0",
"elm-lang/core": "2.0.0 <= v < 4.0.0", "elm-lang/core": "4.0.0 <= v < 5.0.0"
"laszlopandy/elm-console": "1.1.0 <= v < 2.0.0"
}, },
"elm-version": "0.15.0 <= v < 0.17.0" "elm-version": "0.17.0 <= v < 0.18.0"
} }

View file

@ -0,0 +1,4 @@
@echo off
for %%f in (*Tests.elm) do (
elm-make %%f --yes --output build.js && node build.js
)

View file

@ -0,0 +1,2 @@
#!/usr/bin/env bash
elm-make *Tests.elm --yes --output build.js && node build.js

View file

@ -1 +1 @@
module RobotSimulator (..) where module RobotSimulator exposing (..)

View file

@ -1,4 +1,4 @@
module RobotSimulator (..) where module RobotSimulator exposing (..)
import String import String

View file

@ -1,7 +1,5 @@
module Main (..) where module Main exposing (..)
import Task
import Console
import ElmTest exposing (..) import ElmTest exposing (..)
import RobotSimulator exposing (defaultRobot, Robot, Bearing(North, East, West, South), turnRight, turnLeft, advance, simulate) import RobotSimulator exposing (defaultRobot, Robot, Bearing(North, East, West, South), turnRight, turnLeft, advance, simulate)
@ -126,6 +124,6 @@ tests =
] ]
port runner : Signal (Task.Task x ()) main : Program Never
port runner = main =
Console.run (consoleRunner tests) runSuite tests

View file

@ -1,5 +1,5 @@
{ {
"version": "1.0.0", "version": "2.0.0",
"summary": "Exercism problems in Elm.", "summary": "Exercism problems in Elm.",
"repository": "https://github.com/exercism/xelm.git", "repository": "https://github.com/exercism/xelm.git",
"license": "BSD3", "license": "BSD3",
@ -8,9 +8,8 @@
], ],
"exposed-modules": [], "exposed-modules": [],
"dependencies": { "dependencies": {
"deadfoxygrandpa/elm-test": "3.0.1 <= v < 4.0.0", "elm-community/elm-test": "1.0.0 <= v < 2.0.0",
"elm-lang/core": "2.0.0 <= v < 4.0.0", "elm-lang/core": "4.0.0 <= v < 5.0.0"
"laszlopandy/elm-console": "1.1.0 <= v < 2.0.0"
}, },
"elm-version": "0.15.0 <= v < 0.17.0" "elm-version": "0.17.0 <= v < 0.18.0"
} }

View file

@ -0,0 +1,4 @@
@echo off
for %%f in (*Tests.elm) do (
elm-make %%f --yes --output build.js && node build.js
)

Some files were not shown because too many files have changed in this diff Show more