do's and error messages
Mon, 16 Jul 2001 16:56:24 +0200
If you have a type error message at the very start of a "do" statement, the result
can be rather confusing, because the typechecker doesn't "know" that do's are
almost always have type (IO (something)) and so tries to shoehorn the monad
to fit the type. This has actually happened to me several times; the worst
case is when the result is (for example) a list, which allows the error to
propagate further. Is there some way of doing something about this?