1
1
mirror of https://github.com/qfpl/applied-fp-course.git synced 2024-09-11 04:25:40 +03:00
Commit Graph

266 Commits

Author SHA1 Message Date
Jack Kelly
9443a817c1 Bump stackage LTS version 2020-02-05 11:26:59 +10:00
Jack Kelly
cb721bd08f Uncomplete Level01 core 2020-02-05 07:59:27 +10:00
endgame
8f003686c0
Merge pull request #90 from qfpl/package-updates
Package updates
2020-01-31 14:53:54 +10:00
Jack Kelly
2623e3b5db Doc updates 2020-01-31 14:52:30 +10:00
Jack Kelly
95598cf30b Expand versions, bump nixpkgs snapshot 2020-01-23 14:49:44 +10:00
Jack Kelly
a8d270b4c6 Fix monospace quoting 2020-01-23 14:46:52 +10:00
Erzsebet Nemeth
cd7b054055
Update Data61 logo 2019-11-25 11:51:48 +10:00
Sean Chalmers
e0832881cf
Merge pull request #88 from qfpl/semigroup-last
Last from Monoid is deprecated, use the one from Semigroup
2019-09-19 12:56:56 +10:00
Sean Chalmers
0f6ec9fa16 Add document for facilitators 2019-09-18 13:34:10 +10:00
Sean Chalmers
e2c34b647f Related to #83 - Remove some references to 'monad transformers' 2019-09-12 11:52:43 +10:00
Sean Chalmers
2470996792 Fix Last semigroup example in the docs 2019-09-12 10:57:56 +10:00
Sean Chalmers
aaf4522752 Update docs after removal of Monoid for PartialConf 2019-09-12 10:53:13 +10:00
Sean Chalmers
2b796f10b7 Last from Monoid is deprecated, use the one from Semigroup
Towards #86
2019-09-12 10:15:54 +10:00
Sean Chalmers
ef287f1aec Callout the use of runDBAction.
This is a naive attempt at #85, since it is easy to miss the reference to catching the
possible exceptions from the SQLite functions.
2019-09-12 09:56:43 +10:00
Sean Chalmers
59cb74dfdc Merge branch 'master' of github.com:qfpl/applied-fp-course 2019-09-12 09:47:07 +10:00
Sean Chalmers
abb0f7cba9 Fixes #87 - Remove return from Monad instances
The `return` function is defaulted to `pure`. So it doesn't benefit anyone to have to
reimplement it.

Updated a couple of URLs in a readme to use `https`.
2019-09-12 09:45:58 +10:00
endgame
7bd18a998f
Level06/AppM.hs: fix error message 2019-09-10 09:11:48 +10:00
Sean Chalmers
8c160ca978 Remove recommendation for using cabal sandboxes 2019-09-05 15:29:49 +10:00
Sean Chalmers
da0b2056d2 Fixes #80
Update doctests to include `runAppM`, and change the `undefined` to
indicate that it should be replaced with a constructor.

Add more guidance to the `readConfFile` function.
2019-07-04 10:04:22 +10:00
Sean Chalmers
80c70f064b
Merge pull request #79 from groodt/greg-add-cabal-nix-shell
Add Cabal to nix-shell
2019-06-27 12:17:48 +10:00
Greg Roodt
0cbdfe3154 Add missing Cabal. 2019-06-24 09:32:49 +10:00
Tony Morris
ae80863396
Merge pull request #78 from qfpl/update-travis
Update travis GHC 8.6.2 -> 8.6.4
2019-03-10 20:57:09 +10:00
George Wilson
e0274a6a42 Update travis GHC 8.6.2 -> 8.6.4 2019-03-10 17:24:34 +10:00
Sean Chalmers
2adc05e2eb Disable documentation in cabal.project.
The haddocks will fail to build and this will cause a build failure if
you have documentation enabled.

Note that if this is overridden then there is nothing to be done about
it and the documentation will fail your build.

Fixes #77
2019-03-01 09:31:41 +10:00
Sean Chalmers
c673d27b45
Update the pinned nixpkgs, upgrade pkgs. (#74)
* Update the nixpkgs pinned version and move to explicit json file. Upgrade tasty-wai and waargonaut. Update affected levels

* Update versions in stack file.

* Add sop-core to stack.yaml

* Separate out overlays

Clean up default.nix

* Clean up `parseJSONConfigFile` with new Waargy goodness
2019-02-28 14:29:08 +10:00
Sean Chalmers
560a31e691
Merge pull request #73 from Errorific/level04_order
level04/Types.hs indicates the wrong next step
2019-02-20 09:08:41 +10:00
Chris Mckay
72629271b2
Changed the next module instruction for level04/Types.hs to match Readme order 2019-02-12 09:28:46 +10:00
Sean Chalmers
4403218268
Merge pull request #72 from gregberns/new-run
Change instructions to use 'new-run'
2019-01-08 08:46:05 +10:00
Sean Chalmers
a3c4ee786e Fix Error to be polymorphic for Level 07 instance of MonadError. 2019-01-03 09:05:14 +10:00
Greg Berns
104515f7d6 Change instructions to use 'new-run' 2018-12-25 19:14:35 -07:00
Sean Chalmers
1ce56dcb0c Pin nixpkgs
Reorder the modules in level04 to make the order more clear.

Add explicit exports to the AppM modules in 5,6, and 7 to help make it clearer
that you don't need to use the explicit constructors.

Update type signatures for config file functions in level 6 to use the newly
generalised AppM to take advantage of the variable error type.
2018-12-14 13:15:08 +10:00
Sean Chalmers
b8921cd1aa
the bonnet is up and we're on bricks. Fix it. (#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
2018-12-07 10:16:13 +10:00
Sean Chalmers
95f268c504
Merge pull request #69 from treffynnon/minor-fixes
Minor fixes
2018-12-04 09:40:16 +10:00
Simon Holywell
6a11f48a59 Level07: throwLeft -> liftEither 2018-11-29 14:08:19 +10:00
Simon Holywell
3e1f0c3f07 Level06: throwLeft -> liftEither 2018-11-29 14:07:30 +10:00
Simon Holywell
18e3742266 dbName: firstapp -> app_db.db 2018-11-29 14:06:03 +10:00
Simon Holywell
af7b9ea3a9 Add new line before app_db.db 2018-11-29 14:04:31 +10:00
Sean Chalmers
64c0625b06
Merge pull request #68 from treffynnon/patch-1
Typo fix throwLeft -> liftEither
2018-11-29 09:46:53 +10:00
Simon Holywell
91133bf3db
Typo fix throwLeft -> liftEither 2018-11-27 12:32:29 +10:00
Sean Chalmers
f1e89235f0
Remove the need to explain lawless (and weird) typeclass usage from tests (#64)
* Started replacing hspec-wai silliness
* Start replacing the more interesting tests
* Refactor the remaining test files
* Add transformers dependency to test-suite
* Added transformers to test-suite dependency but forgot to add it to the doctests dependency list as well
* Cache the stack build directory to speed up travis builds
* Bump upper bound for doctest to permit GHC 8.6
* Fix up import indentation
2018-11-07 16:33:06 +10:00
Sean Chalmers
14ebd0f803
Merge pull request #65 from qfpl/ghc-8.6
Make the course work on GHC 8.6
2018-10-15 15:32:31 +10:00
George Wilson
9cff291761 Make the course work on GHC 8.6 2018-09-27 14:11:10 +10:00
Sean Chalmers
7df3a95c75 Fixes #61
Added some more breadcrumbs and indication of where to go next for some of the
later levels.
2018-08-31 10:21:01 +10:00
Sean Chalmers
a252316c26 Fixes #62
Qualified import of Aeson was not consistent in File module for levels six
and seven.

Fixed inconsistent casing of 'Db', finally, again, I think.
2018-07-23 10:53:53 +10:00
Sean Chalmers
20b19b1cb7 Fixes #63
Add some more instruction regarding the logging function that is added in Level
07 AppM module.
2018-07-23 10:07:19 +10:00
Sean Chalmers
4482150006 Added some more headings to main README for build tools. 2018-07-06 09:19:39 +10:00
Sean Chalmers
67686fe728 Updated wording in main README. 2018-07-06 09:16:29 +10:00
Sean Chalmers
cae4166b48 Tweak readme for consistent capitalisation. 2018-07-05 15:36:45 +10:00
Sean Chalmers
c9012dee14
Merge pull request #58 from nghamilton/nick-suggestions
Fixes for typos and instructions
2018-07-05 15:20:50 +10:00
Nick Hamilton
9d5a7645ca Merge branch 'master' of github.com:nghamilton/applied-fp-course into nick-suggestions 2018-06-13 12:12:45 +02:00