ConsumerDataStandardsAustralia / validation-prototype

Validation Prototype of Consumer Data Standards (fka conformance)
Other
9 stars 11 forks source link

Proof of concept auth algebra. #61

Closed ajmcmiddlin closed 5 years ago

ajmcmiddlin commented 5 years ago

Wire a dummy auth algebra together with the existing bank algebra using the machinery from Data types a la carte.

This PR is to get feedback on the approach before progressing to an actual implementation of auth. Currently the auth API is limited to incrementing an Integer stored in a TVar. Given the auth implementation is intended for testing only, it will likely keep its state in some data structure using STM, so this PoC is pretty representative.

@benkolera, please check the changes to Model.hs in case they make you sad.

ajmcmiddlin commented 5 years ago

@benkolera will check the whitespace. Agree on the naming, but didn't think about it yet. Wanted to float the approach first and foremost.