cookbook: add jsonerror section
I have yet to figure out how to build the cabal project for the cookbook.
cabal new-build cookbook-jsonerror should do, I think.
Pushed a few fixed to make sure it compiles.
I'd also like to update .travis.yml to actually test this on CI, but I don't see how its possible to generate the file since https://github.com/haskell-servant/servant/pull/917 landed.
Hmm, I think you just need to mimic e.g doc/cookbook/db-sqlite-simple, i.e have your jsonerror example be handled the same way we handle any other cookbook example. That precise bit of the travis script IIRC isn't generated automatically.
Maybe those backjumps are still needed:
Resolving dependencies...
cabal: Could not resolve dependencies:
[__0] trying: cookbook-pagination-2.1 (user goal)
[__1] next goal: servant-pagination (dependency of cookbook-pagination)
[__1] rejecting: servant-pagination-2.1.0 (conflict: requires
TypeApplications)
[__1] rejecting: servant-pagination-2.0.0, servant-pagination-1.0.0 (conflict:
cookbook-pagination => servant-pagination>=2.1.0 && <3.0.0)
[__1] fail (backjumping, conflict set: cookbook-pagination,
servant-pagination)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: cookbook-pagination,
servant-pagination
Hi @domenkozar! Could you please rebase this PR? We intend to have before the next major release of Servant. :)
I think this should be just part of servant, I'll add a TODO.