A demo of how to enhance a webapi built with Servant (A web api framework) by capturing knowledge in types with the help of the "Ghosts of Departed proofs"-package (GDP).
This is a way to embrace knowledge-as-code for fun and profit.
- install nix-shell
- run
nix-shell
- run
stack run
- ApiDeclaration.hs
- ApiImplementation.hs
- Animals.hs
- DomainProofs.hs
http://localhost:8484/habitats/north-pole/animals/5?user=user1 http://localhost:8484/habitats/north-pole/animals/5?user=user2 http://localhost:8484/habitats/savanna/animals/5?user=user1 http://localhost:8484/habitats/savanna/animals/5?user=user2