-
-
Notifications
You must be signed in to change notification settings - Fork 35
Migrate from Spago 0.21.0 to Spago 1.0.3 #322
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,23 +1,21 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| # This script will update spago.dhall and package.dhall of all exercises | ||
| # This script will update spago.yaml and .gitignore of all exercises | ||
| # using the master files from the project template (template/). | ||
|
|
||
| set -e | ||
| set -o pipefail | ||
| set -u | ||
|
|
||
| base_dir=$(builtin cd "${BASH_SOURCE%/*}/.." || exit; pwd) | ||
| exercises_dir="${base_dir}/exercises" | ||
| template_dir="${base_dir}/template" | ||
|
|
||
| for config in "$exercises_dir"/*/*/spago.dhall; do | ||
| exercise_dir=$(dirname "${config}") | ||
| for exercise_dir in "$base_dir"/exercises/*/*; do | ||
| [ -d "${exercise_dir}" ] || continue | ||
| slug=$(basename "${exercise_dir}") | ||
|
|
||
| echo "Working in ${exercise_dir}..." | ||
|
|
||
| sed -e "s/exercise-template/${slug}/" < "${template_dir}/spago.dhall" > "${exercise_dir}/spago.dhall" | ||
| cp "${template_dir}/packages.dhall" "${exercise_dir}/packages.dhall" | ||
| sed -e "s/exercise-template/${slug}/" < "${template_dir}/spago.yaml" > "${exercise_dir}/spago.yaml" | ||
| cp "${template_dir}/.gitignore" "${exercise_dir}/.gitignore" | ||
| done |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,5 @@ | ||
| /bower_components/ | ||
| /node_modules/ | ||
| /.pulp-cache/ | ||
| /output/ | ||
| /generated-docs/ | ||
| /.psc-package/ | ||
| /.psc* | ||
| /.purs* | ||
| /.psa* | ||
| /.spago | ||
| /.spago/ | ||
| /spago.lock | ||
| /.purs-repl |
This file was deleted.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| package: | ||
| name: annalyns-infiltration | ||
| dependencies: | ||
| - arrays | ||
| - console | ||
| - datetime | ||
| - effect | ||
| - either | ||
| - enums | ||
| - exceptions | ||
| - foldable-traversable | ||
| - integers | ||
| - lists | ||
| - maybe | ||
| - numbers | ||
| - ordered-collections | ||
| - partial | ||
| - prelude | ||
| - psci-support | ||
| - strings | ||
| - test-unit | ||
| - tuples | ||
| - unfoldable | ||
| - unicode | ||
| test: | ||
| main: Test.Main | ||
| dependencies: [] | ||
| workspace: | ||
| packageSet: | ||
| registry: 73.0.0 | ||
| extraPackages: {} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,5 @@ | ||
| /bower_components/ | ||
| /node_modules/ | ||
| /.pulp-cache/ | ||
| /output/ | ||
| /generated-docs/ | ||
| /.psc-package/ | ||
| /.psc* | ||
| /.purs* | ||
| /.psa* | ||
| /.spago | ||
| /.spago/ | ||
| /spago.lock | ||
| /.purs-repl |
This file was deleted.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| package: | ||
| name: accumulate | ||
| dependencies: | ||
| - arrays | ||
| - console | ||
| - datetime | ||
| - effect | ||
| - either | ||
| - enums | ||
| - exceptions | ||
| - foldable-traversable | ||
| - integers | ||
| - lists | ||
| - maybe | ||
| - numbers | ||
| - ordered-collections | ||
| - partial | ||
| - prelude | ||
| - psci-support | ||
| - strings | ||
| - test-unit | ||
| - tuples | ||
| - unfoldable | ||
| - unicode | ||
| test: | ||
| main: Test.Main | ||
| dependencies: [] | ||
| workspace: | ||
| packageSet: | ||
| registry: 73.0.0 | ||
| extraPackages: {} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,8 +2,14 @@ module Accumulate | |
| ( accumulate | ||
| ) where | ||
|
|
||
| import Data.List (List) | ||
| import Effect.Exception.Unsafe (unsafeThrow) | ||
|
|
||
| accumulate :: forall a b. (a -> b) -> List a -> List b | ||
| accumulate = unsafeThrow "You need to implement this function." | ||
| import Data.List (List(Nil), (:), reverse) | ||
|
|
||
|
|
||
| accumulate :: forall a b . (a -> b) -> List a -> List b | ||
| accumulate = | ||
| let | ||
| accumulate' acc f Nil = reverse acc | ||
| accumulate' acc f (v:vs) = accumulate' (f v:acc) f vs | ||
|
Comment on lines
+9
to
+13
|
||
| in | ||
| accumulate' Nil | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,5 @@ | ||
| /bower_components/ | ||
| /node_modules/ | ||
| /.pulp-cache/ | ||
| /output/ | ||
| /generated-docs/ | ||
| /.psc-package/ | ||
| /.psc* | ||
| /.purs* | ||
| /.psa* | ||
| /.spago | ||
| /.spago/ | ||
| /spago.lock | ||
| /.purs-repl |
This file was deleted.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| package: | ||
| name: acronym | ||
| dependencies: | ||
| - arrays | ||
| - console | ||
| - datetime | ||
| - effect | ||
| - either | ||
| - enums | ||
| - exceptions | ||
| - foldable-traversable | ||
| - integers | ||
| - lists | ||
| - maybe | ||
| - numbers | ||
| - ordered-collections | ||
| - partial | ||
| - prelude | ||
| - psci-support | ||
| - strings | ||
| - test-unit | ||
| - tuples | ||
| - unfoldable | ||
| - unicode | ||
| test: | ||
| main: Test.Main | ||
| dependencies: [] | ||
| workspace: | ||
| packageSet: | ||
| registry: 73.0.0 | ||
| extraPackages: {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This implements the concept exercise functions directly in the student-facing
src/file. That will ship a passing solution to learners; concept exercise stubs should require learner implementation, with the reference in.meta/Exemplar.purs. Please revert this file to the intended starter stubs.