qfpl / applied-fp-course

Applied Functional Programming Course - Move from exercises to a working app!
http://qfpl.io/projects/professional-fp-courses/
Other
625 stars 180 forks source link

Full Course Layout Change with a shuffle. #54

Closed mankyKitty closed 6 years ago

mankyKitty commented 6 years ago

Completely restructured the course project layout, the entire course is now a single cabal project. This means there is only one list of dependencies to maintain, one nix derivation, and one stack file.

The individual course levels are now self-contained modules. This makes a few things easier:

Added individual executable entries to the cabal file for the different levels. All tests are bundled into doctest and app-fp-tests cabal test-suites, changing which one is being is a matter of uncommenting the desired level in the top level Haskell test file.

The final level on ExceptT in disguise, has been moved to be Level05, and the other levels have been bumped forward accordingly. The laborious handling of Either values throughout the course is what appeared to slow a lot of students down, and after about two levels of it, it doesn't provide much value.

But it does provide enough motivation for presenting a useful abstraction that does away with the whole mess almost entirely. Introducing and implementing their own ExceptT at a much earlier stage should allow the students to move forward at a faster rate and feel the wind in their hair, so to speak. From leveraging a very powerful, but simple, abstraction.

Added an additional exercise to level07 that will have the students use the mtl version of ExceptT to simplify the building of a function. This will show off the generalised version of the type they implemented and how you can just drop it in where you need it. You don't need to design your entire application around it.

The levels haven't been run with the new ordering so we might need to come up with some new levels pretty soon if it turns out to be the only thing that was slowing students down.