A wish: type error messages

Erik Zuurbier F.S.A.Zuurbier@inter.nl.net
Fri, 23 Jan 1998 18:18:12 +0100


Tuomas S. wrote:
>Now when program is OK, compiler can (optionally) show all inferred types.
>However when an type error in form "demanded type X dos not match type Y"
>occurs, this information is not available.
>
>Wish:
>Could some future release of compiler (optionally) show some more
>information, like recursively the earlier types, witch have lead the
>compiler to believe, that the expresson types X and Y are what they seam to
>be? Since the real logical error can be elsewear. This would make debugging
>easier, I think.

I support this wish. For the time being there is a  solution.
What I do when a function appears to have a type error, say:

Fun :: a -> b
Fun x = garble garble

I insert 'undef //' after the = sign:

Fun :: a -> b
Fun x = undef // garble garble

Then I recompile and get the other type information.
But this should indeed not be necessary.

Erik Zuurbier