Extracted from #87
These both can be written without touching any of the core compiler codebase.
I merged the PR as development can continue without full tests written. I mostly wanted to get the changes on #79's branch.
Milestone: later.