The Yesod Calculator small RESTful API built with the Yesod Framework. It's goal is to simulate the basic operations of a calculator such as addition and subtraction. As well as this it's intention is to demonstrate the ability to provide both authentication, authorisation and persistence in a haskell environment.
- Arithmetic Operations.
- Authentication with support for both authenticated and unauthenticated requests.
- Persistent database storage.
- Calculation history by user.
- Nth digit of Pi calculator.
- Parallel Computation of fibonacci numbers.
The Calculator API requires the following installed:
- Stack Build Tool
- Cabal Dependancy Manager
- Yesod Command Line Tool
- Clone the GitHub repository in a directory of your choosing.
git clone https://github.com/Lewis-Allen/Yesod-Calculator-API
- Navigate into the new Yesod-Calculator-API directory
cd Yesod-Calculator-API
- Build and run the project
stack build && stack exec my-project
Tests are run automatically through the stack tool.
stack test
- Yesod Web Framework Book by Michael Snoyman - Authentication, Shakespearean Templates, Persistence.
- Unbounded Spigot Algorithms for the Digits of Pi by Jeremy Gibbons - Formulae for calculating infinite list of pi.