1
1
mirror of https://github.com/qfpl/applied-fp-course.git synced 2024-11-26 14:43:53 +03:00
applied-fp-course/level05
Sean Chalmers 554bdc1e08 Add mention of fromIntegral function.
Per #28 , added some wording for the `fromIntegral` function.

Removed the 'aside' for `ghcid` as this was causing more problems
than it was solving. Too many install / usage dramas.

Added a snippet for loading a repl with test libraries and packages
loaded. Because I had completely forgotten how to do that.
2018-02-02 10:44:53 +10:00
..
bin Updates based on course run feedback. 2018-01-16 12:36:57 +10:00
src/FirstApp Add mention of fromIntegral function. 2018-02-02 10:44:53 +10:00
tests Updates based on course run feedback. 2018-01-16 12:36:57 +10:00
appconfig.json Updates based on course run feedback. 2018-01-16 12:36:57 +10:00
changelog.md change changelog files to lowercase 2017-09-01 11:17:26 +10:00
default.nix Overhauled nix file setup to be more like the other QFPL projects. 2017-09-18 10:14:29 +10:00
level05.cabal Upgrade CI so we test building with stack as well 2018-02-02 09:59:55 +10:00
level05.nix Updates based on course run feedback. 2018-01-16 12:36:57 +10:00
LICENCE update copyright notice 2017-09-12 11:51:26 +10:00
README.md Updates based on course run feedback. 2018-01-16 12:36:57 +10:00
Setup.hs Added Level05 - Add a database [WIP] 2017-08-11 16:28:56 +10:00
stack.yaml Update to stackage LTS 10 (GHC 8.2.2) 2018-01-31 12:20:33 +11:00
test.json Updates based on course run feedback. 2018-01-16 12:36:57 +10:00

Level 05

In this exercise we build some configuration capabilities into our application.

This exercise will require a combination of building the right types to guide your development, plus consulting plenty of documentation to leverage the chosen packages. There may also be, depending on your level of interest, some external reading for later as well.

The steps for this level:

  1. src/FirstApp/Types.hs
  2. src/FirstApp/Conf/File.hs
  3. src/FirstApp/Conf.hs
  4. src/FirstApp/Main.hs

The packages we will use for this are:

Aside: Tool Introduction - doctest

This level utilises the doctest tool to help us ensure our functions comply with some quick tests that are written as comments in the source file. This is a port of the same technology that exists in Python.

You can see the new entry in the Cabal file as another test-suite. The doctests.hs lists the files that have doctests that we want to run. The src/FirstApp/Conf/File.hs file contains some tests that you need to update as part of the level.

For details on running and writing doctests, refer to the documentation.