[Hat] HAT issue

Malcolm Wallace hat@haskell.org
Mon, 28 Oct 2002 10:05:56 +0000


Adam Poswolsky <adam.poswolsky@yale.edu> writes:

> Hi, I was using your HAT utility to trace through a program of mine and
> it encountered an odd problem when i tried to do "hmake -hat ....."
> I think this may be a known problem where you say
> 	hat-trans output fails to compile if the source program depends on
> 	defaults 	to resolve numeric types. 
> However, I am not sure.

Yes.  Without the type signature, the numeric type would normally
default to Integer.  Because of a quirk in the design of the Haskell
language, it is impossible for Hat to use the defaulting rule, and
hence you need to add sufficient type signatures to fill in the blanks.
You resolved the numeric type to Int, which is different from the
default, but in this case it doesn't really matter which type you
choose.

> BTW, Your tool turned out to be VERY useful.  Thanks!

Good!

Regards,
    Malcolm