Implement a better typechecker for Dhall. Hopefully still straightforward to implement and with good errors.
I think it will essentially be a reification of the typechecker into data structures such that data still only flows one way, but acts like it flows both ways via substitution. Very tricky.
If I get it implemented, then I can look at performance.