type-driven development is always fun!
Commit
06e127e
share more pls
the part that still fascinates me is that a type can be a proof. if Approved (a status) can only be built by an approve() that takes a Submitted request, then holding an Approved is the evidence it went through approval. no need for runtime check, the compiler just enforces it. btw, Alexis King's "Parse, don't validate" is a great read on this..
commit 06e127e
wanted to read "Parse, don't validate" after watching this talk https://www.youtube.com/watch?v=0BXuYlNrUmE&pp=ygULYWxleGlzIGtpbmc%3D then forgot so this was a good reminder lol