Some comments here would be nice. :)

Also, can we make `type-case` introduce an internal def ctxt so that we can use `define` instead of `let`?