Better approximation to type checking.

Type checking works in compiled code but not in GHCi.