Eff, Lenses, Card DSL, Test Handlers
No due date
33% complete
Revamp the architecture.
Currently:
- OverloadedRecordUpdate is way less flexible, complete, and functional than lenses,
-
mtl
-style typeclasses means we gotta useinstance
s, I prefer the ergonomics and flexibility of Effects (handlers are mere functions), - There is no Card DSL,
- There are tests, but we cannot deterministically inject randomness in a clean way…
Revamp the architecture.
Currently:
- OverloadedRecordUpdate is way less flexible, complete, and functional than lenses,
mtl
-style typeclasses means we gotta useinstance
s, I prefer the ergonomics and flexibility of Effects (handlers are mere functions),- There is no Card DSL,
- There are tests, but we cannot deterministically inject randomness in a clean way. Currently, to test random functions, I have refactored a random
foo
function into afoo_handler
function, wherefoo_handler
generates the random numbers that are then passed as arguments intofoo
. For testing, I just need to specify the arguments forfoo
and testfoo
. However, this is not flexible. With mock effects, I can do this cleaner.