forked from qfpl/applied-fp-course
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
the bonnet is up and we're on bricks. Fix it. (qfpl#71)
* Add shell.nix that includes sqlite. previous shell environment didn't include an application that was necessary for developing the application. Whoops. This new shell.nix lets students add their own development tools if they want to try something out. `ghcid` for example. * Overhaul: New techniques, new exercises. Remove hspec-wai dependencies, add waargonaut. The aeson dependency has been replaced with waargonaut, and the exercises have been updated to match. Some exercises have been removed. Add the use of `finally` as a demonstration and reminder that we should be cleaning up things like connections when an app is done. Explain the purpose of the `runDB` function so that implementation makes more sense to students as an exercise. Add exercise to generalise the error type that is used in the `AppM` transformer that they implement. This flows onto a later exercise where they reuse this type to simplify a function that is not part of the core application. This also allows for an easier introduction of `ExceptT` as an exercise later in the course when `AppM` is no longer usable. Add a startup error constructor as making the students add it isn't informative when compared to the rest of the exercise. * Remove all duplicate tests. Rebuild Level03. Level03 has been changed entirely to be centered on writing tests for student code. The tests are then to be updated by the students as they progress through the course. There are no duplicated tests and there is a bit more incentive for students to get in and get their hands dirty with respect to testing their own work. Still not sure what to do with doctests just yet. More documentation is required for that. * Remove Level03 exe and modules. * Feedback driven development * Add tighter bounds for lens. * Add bounds for old-locale and contravariant. * Realign some imports. * Rename 'AppM'' to 'AppM' and 'AppM' to 'App'. * Clean up an utterly misleading and out of date comment regarding configuration package choices. Revert to unremarkable statement about it being JSON. * Remove redundant import of `Level02.Types` from `tests/Test.hs`. * Add waargonaut to extra-deps in stack.yaml. * Bump LTS in stack.yaml to 12.14. * Fix typos. * Improve wording, restructure some comments. * Revert LTS bump, increase contravariant upper bound for GHC 8.6.1 * Try updated stack.yaml * Update travis.yml: Bump patch versions of GHC: * 8.4.3 -> 8.4.4 * 8.6.1 -> 8.6.2 Drop Stack LTS: 6, 9, 10 Add Stack LTS: 11, 12 * Add fixes to help stack nightly builds on travis. Remove some comments in cabal file * Remove LTS-11, add in-memory db notes to level04 * add workshop levels document for expansion * Proofread changes. * Try to use cached GHC downloads for stack on travis * Remove install ghc flag from stack commands * Last try to stop stack downloading its own GHC * Revert stack travis changes. Attempt to pin appar version for 7.10.3. * Drop support for GHC 7.10.3
- Loading branch information
1 parent
95f268c
commit b8921cd
Showing
58 changed files
with
1,104 additions
and
1,947 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"url": "https://github.com/qfpl/tasty-wai", | ||
"rev": "17ae906f318a222eb30a22b6b334399a0ca436a9", | ||
"date": "2018-12-04T14:31:04+10:00", | ||
"sha256": "16j3qbpwxbl4n2pvck91k6gz2541pkfdpxn4l47nf1s9jx9yaa7f", | ||
"fetchSubmodules": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
let | ||
initialNixpkgs = import <nixpkgs> {}; | ||
|
||
sources = rec { | ||
tasty-wai-pinned = initialNixpkgs.pkgs.lib.importJSON ./tasty-wai.json; | ||
tasty-wai = initialNixpkgs.pkgs.fetchFromGitHub { | ||
owner = "qfpl"; | ||
repo = "tasty-wai"; | ||
inherit (tasty-wai-pinned) rev sha256; | ||
}; | ||
}; | ||
in | ||
sources.tasty-wai |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"url": "https://github.com/qfpl/waargonaut", | ||
"rev": "7d868c5ca568797345cee762a499488227238b1f", | ||
"date": "2018-11-29T12:55:15+10:00", | ||
"sha256": "1hr0iyzcamgknsx4830rzvfxy6ykslnalfvbxb6k7h8ywkd2zzc2", | ||
"fetchSubmodules": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
let | ||
initialNixpkgs = import <nixpkgs> {}; | ||
|
||
sources = rec { | ||
waargonaut-pinned = initialNixpkgs.pkgs.lib.importJSON ./waargonaut.json; | ||
waargonaut = initialNixpkgs.pkgs.fetchFromGitHub { | ||
owner = "qfpl"; | ||
repo = "waargonaut"; | ||
inherit (waargonaut-pinned) rev sha256; | ||
}; | ||
}; | ||
in | ||
sources.waargonaut |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ nixpkgs ? import <nixpkgs> {} | ||
, compiler ? "default" | ||
}: | ||
let | ||
inherit (nixpkgs) pkgs; | ||
|
||
# Grab our course derivation | ||
course = import ./. { inherit nixpkgs compiler; }; | ||
|
||
# Override the basic derivation so we can have a more fully feature | ||
# environment for hacking on the course material | ||
courseDevEnv = (pkgs.haskell.lib.addBuildTools course | ||
[ # Include the SQLite Database application | ||
nixpkgs.sqlite | ||
|
||
# 'ghcid' auto reloading tool | ||
nixpkgs.haskellPackages.ghcid | ||
] | ||
# We don't want nix to build the thing, we want the environment so we can | ||
# build the thing. | ||
).env; | ||
|
||
in | ||
# Fly, my pretties! | ||
courseDevEnv |
Oops, something went wrong.