Some of the cabal files had settings that made it difficult/impossible to
initiate the project specific repl. This fix allows you to use:
```
$ cabal repl level0<N>
```
To start a repl for the library for that level.
Reworded the text for the ``Error`` type on level02 as it wasn't immediately
clear that you needed to add your own constructors.
Removed the default constructor for (``RqType``, ``Error``, ``ContentType``) to
try to make it more obvious that you have things to do there. Turned off the
'dodgy-imports' warning for that file specifically to allow for happy repl'ing.
But that was largely due to missing field prefixes in the Comment record for
that level. Field prefixes added back in and added some doctests and changed the
wording for that section to explain a bit more of what is going on.
Added doctests and a shout out to what is going on with "$$tablename$$" in the
``withTable`` function.
Updated the level04 tests file to be a bit more defined and provide an example
of a test that Hspec.Wai lets you write. Information was very thin on the ground
in that file so it would have been too difficult without assistance.
Provided a bit more information about cool things that ``ghcid`` can do that I
didn't know about. :D
Fixes#9, #7, #5
The application only kinda-sorta has an SQL injection risk given that the config
has to be compromised and the application restarted to load the new config. Even
in a learning application like this one it's worth mentioning but still going to
be far from your biggest problem if someone has that level of access to your
servers.
Fixes#8
- Regenerated the individual nix files.
- Removed the shell.nix files
Just running ``$ nix-build`` in levels greater than 2 currently
doesn't succeed, still working on this. The nix-shell environments
work as expected for all levels.
Image link in README should no longer trigger 'insecure content' warnings,
the link was reading from a non-HTTPS source.
Other rewordings and minor refactors
Made the error management for loading the JSON config file work as one might
expect it should. Expanded the error reporting expectations to include specific
file reading and JSON decoding errors.
The difficulties that will be had in handling the multiple either values will
motivate latter sections RE ExceptT (EitherT) transformers. However there is
nothing here that should be beyond people that do not know how transformers
work.
Added more doctests to the different moving parts to make things a bit clearer.
Added doctests to the cabal files and included a 'doctests.hs' to the tests
section.
default.nix files have been updated with the bonus dependency.
There is no persistent storage in the application by the time we're expecting
students to write ``Response`` handling functions. So add some more guidance
that we only expect placeholder values to be used, this wasn't sufficiently
clear. Fixes#3
Updated the latter placeholder values to match the guidance offered, for
consistency.
Updated the configuration ``helloMsg`` value and some of the tests to be a bit
more sensible, even if only a little.
Reworded ``Error`` blurb to direct people to try to write other functions and
see what errors are needed. Fixes#1
Changed the ``Port`` type to ``Word16`` to be more precise about what values we
allow for a port number. Add a helper function to take a ``Conf`` to the ``Int``
value that Wai requires. Fixes#4
Changed the wording of some sections. Added more info to some of the
exercise README files.
Added some more structure to the tests exercise to make it a little
less open. Still undefined sections but there is a bit more guidance
about what things might look like.
Preparation for the name change to 'Applied' instead of 'Advanced'