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

285 Commits

Author SHA1 Message Date
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
Nick Hamilton
0ca5b53710 Removed premature references to transformer stack in src/Level06/Core.hs comments. 2018-06-12 17:00:56 +02:00
Nick Hamilton
fca8d45f87 First reference of runDB in DB.hs, instructions changed to reflect this. 2018-06-12 13:10:10 +02:00
Nick Hamilton
baa99383e3 needsAButMightFail function definition name wrong. 2018-06-11 13:54:02 +02:00
Nick Hamilton
bf538ddf15 Typo in src/Level04/Conf.hs" 2018-06-11 12:23:57 +02:00
Sean Chalmers
6f977bc1e7
Merge pull request #57 from ChristopherDavenport/oldPackageNameIThink
Update Instructions for Level04 DBComment
2018-06-10 16:07:47 +10:00
Nick Hamilton
9f20c8da7a Clarified comment in Level04/Types.hs. 2018-06-08 17:33:59 +02:00
Nick Hamilton
a68745fa3d Level 04 readme.md typo fix. 2018-06-08 17:25:44 +02:00
Chris Davenport
5373d78fb0 Update Instructions for Level04 DBComment 2018-06-08 09:46:20 -04:00
Sean Chalmers
bbf283e7ce Fixes #56 and others
This fixes a slightly confusing type on the `mkErrorResponse` function that
post-refactor doesn't work well anymore. It would force the student to handle
the two `Error` values that should have been collapsed down by this point.

Fixed up some lingering typos in the READMEs that indicated the wrong level
number.

Added a `.dir-locals.el` file for dante.
2018-06-07 16:11:22 +10:00
Sean Chalmers
93b40fa374 Fixes #55
Adds instructions for uncommenting the tests.
2018-05-23 11:26:27 +10:00
Sean Chalmers
4c38627cbe Updated instructor notes.
Ordering of some levels has changed, so the notes needed an update,
although they could probably do with a more thorough going over soon.
2018-05-09 13:51:39 +10:00
Sean Chalmers
0dfeffd040 Fixes #35
Add information on how to load the application into the repl, may
need expanding after field testing.
2018-05-09 11:32:31 +10:00
Sean Chalmers
1266c83611 Merge branch 'master' of github.com:qfpl/applied-fp-course 2018-05-08 09:11:13 +10:00
Sean Chalmers
dd907523ba
Full Course Layout Change with a shuffle. (#54)
* Restructure entire course into a single library with multiple executable definitions. Makes working through the course a bit easier with respect to sandboxes, nix shells, and stack caching. Should be a side benefit of giving editor tooling a bit of an easier time. Lowers switch time between course levels.

* Readme updates to suit new structure.

Add comment to cabal file.

* Syntax error in Travis yml file.

Not sure where yet.

* Applied some linting suggestions to travis file

* Fixed missing comments in travis yml, removed duplicate executable entry in the cabal file

* Added changelog file, vcs entry to cabal file

* Fixing travis file, WIP.

* Still trying

* Added cabal.project file

* Still trying (Travis)

* Moved var declaration to higher level in travis.yml file.

* Forgo the complexity of hvrs script and go low-tech.

* Remove Haddocks from stack build.

Add extra-deps because what was a working stack build is now failing for some
reason, despite having the same version bounds and using the same LTS as before.

* Added more deps to extra-deps to appease the stackbeast.

* Updated base README

* Readme tweaks, level 03 test updates

* Moved Level07 to Level05, bumped other levels accordingly.

* Moved 'Main' to 'Core'.

Updated READMEs, first pass.

Updated Cabal file.

Updated Tests to handle change of Main to Core.

* Proof read #3616

Lots of small fixes for file paths, wording, some additional exercises. Fixed up
the tests to be more consistent as they've been reordered a few times and mostly
left to rot.

Readmes updated where needed.

New exercise added to level07 for using the general `ExceptT` type.

* Fix up some tests and avoid any more dynamic linking errors, I think

* Fix up cabal config for doctests, missing packages and some exposed-modules

* Removed use of Semigroup in tests to avoid CPP in cabal file for including semigroups package. Added bounds to base dependency for doctests test-suite
2018-05-08 09:02:51 +10:00
Sean Chalmers
bbfb78cef6 Update changelog file in cabal files 2018-04-30 09:39:44 +10:00
Sean Chalmers
10612052be
Merge pull request #53 from it4rb/master
correct link in level04 README
2018-04-04 09:44:07 +10:00
Sean Chalmers
d9731ad039
Merge pull request #52 from gwils/relax-http-types-upper-bounds
Relax the version bounds on http-types.
2018-04-04 09:43:12 +10:00
Sean Chalmers
0563ee3cab
Merge pull request #51 from gwils/all-upper-bounds
Add upper bounds to all dependencies
2018-04-04 09:42:00 +10:00
Sean Chalmers
4dbbf4cc1b
Merge pull request #50 from gwils/support-ghc-8.4.1
Add support for GHC 8.4.1
2018-04-04 09:41:01 +10:00
Le Cao
5269a43974 correct link in level04 README 2018-03-31 22:01:44 +07:00
George Wilson
7bc1a8e807 Relax the version bounds on http-types. 2018-03-29 21:59:38 +10:00
George Wilson
e7dd6b5a9f Add upper bounds to all dependencies 2018-03-29 21:37:07 +10:00
George Wilson
bbfae6a6d6 Add support for GHC 8.4.1
Also remove 7.8 with lower bounds, since we don't support it.
2018-03-29 21:18:06 +10:00
George Wilson
020961d4a2
Merge pull request #49 from qfpl/travis-chgs
Travis changes & Version Bumps
2018-03-29 11:05:52 +10:00
George Wilson
e50667fc6e Bump some upper bounds, and replace <= with < in upper bounds 2018-03-28 11:04:07 +10:00
Sean Chalmers
f95b7d2eae
Merge pull request #48 from parsonsmatt/master
Fix stack ghci instruction
2018-03-26 10:30:33 +10:00
Matt Parsons
58beb17c0a Fix stack ghci instruction 2018-03-24 11:27:55 -06:00
Sean Chalmers
5c6c8bdaf2 Forgot to bump level06 doctest dependency 2018-03-22 16:23:15 +10:00
Sean Chalmers
6125f12643 Loosen doctest bounds 2018-03-22 13:56:00 +10:00
Sean Chalmers
25c06ada7f Test builds with Cabal 2.0 for all GHC versions. Loosen upper bound for base to accommodate GHC 8.4.1 2018-03-22 13:30:38 +10:00
Sean Chalmers
394746b431 Try to reduce the number of redundant package builds without cabal new-build 2018-03-22 11:59:37 +10:00