[nhc-bugs] Record typing bug

Malcolm Wallace Malcolm.Wallace@cs.york.ac.uk
Wed, 18 Dec 2002 17:02:42 +0000


"Simon Marlow" <simonmar@microsoft.com> writes:

> The following program causes a type error with nhc98:
> 
>   module Test where
>   type S a = a
>   data T a = A { f :: a } | B { f :: S a }
> 
> ======  Errors after type inference/checking:
> Type error (type-variable occurrence check fails)
> when binding final type to function at 5:16.

Obviously the expansion of type synonyms is not happening before
the unification occurrence check of a against S a.  I'll add it to
the list of type system bugs in nhc98.

> I'm not quite sure which version of nhc98 I have here:
> 
> > nhc98 --version
> /home/simonmar/fp/bin/i386-unknown-linux/nhc98: 2.01

Oh dear, that looks like a Hat version number, not an nhc98 version number.
Which would also explain the strange shell-driver error:

> nhc98: test: -ne: unary operator expected

I think the cause of this one is down to building (or rather,
configuring) both nhc98 and hat in the same CVS tree - the
auto-generated build config files share the same name, and most of
the same contents, but clearly they are not identical.

Regards,
    Malcolm