Add more information to the error data type.
Add new type for type inference context.
Add reader monad onto the stack to simplify error contexts.
Move the type inference monad into separate module.
Comments for the new functions.