Start work on the linter

We are starting to reuse bits form the linter in the type checker. Actually, I
think we might able to define the type checker _in terms of_ the linter, but
we'll see when the linter is done.