Skip to content

Eff, Lenses, Card DSL, Test Handlers

No due date 33% complete

Revamp the architecture.

Currently:

  1. OverloadedRecordUpdate is way less flexible, complete, and functional than lenses,
  2. mtl-style typeclasses means we gotta use instances, I prefer the ergonomics and flexibility of Effects (handlers are mere functions),
  3. There is no Card DSL,
  4. There are tests, but we cannot deterministically inject randomness in a clean way…

Revamp the architecture.

Currently:

  1. OverloadedRecordUpdate is way less flexible, complete, and functional than lenses,
  2. mtl-style typeclasses means we gotta use instances, I prefer the ergonomics and flexibility of Effects (handlers are mere functions),
  3. There is no Card DSL,
  4. 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 a foo_handler function, where foo_handler generates the random numbers that are then passed as arguments into foo. For testing, I just need to specify the arguments for foo and test foo. However, this is not flexible. With mock effects, I can do this cleaner.
Loading