Rename TypeError to TypeM.

Rename TypeError to a more generic name so that other monad transformers (e..g, state monad for type environment) can be added later.
Rename TypeErrorType to TypeError.

TypeErrorType is a little awkward name.