mirror of
https://github.com/qfpl/applied-fp-course.git
synced 2024-11-26 14:43:53 +03:00
00e02a3f9d
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.
18 lines
516 B
Nix
18 lines
516 B
Nix
{ mkDerivation, base, wai, warp, http-types, aeson, optparse-applicative, doctest,
|
|
hspec, hspec-wai, mtl, sqlite-simple, sqlite-simple-errors
|
|
, stdenv
|
|
}:
|
|
mkDerivation {
|
|
pname = "level06";
|
|
version = "0.1.0.0";
|
|
sha256 = "0";
|
|
isLibrary = false;
|
|
isExecutable = true;
|
|
executableHaskellDepends = [
|
|
base wai warp http-types optparse-applicative aeson
|
|
doctest hspec hspec-wai mtl sqlite-simple sqlite-simple-errors
|
|
];
|
|
description = "Simplest of web apps";
|
|
license = stdenv.lib.licenses.bsd3;
|
|
}
|