
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 } ~/scratch > nhc98 test.hs /home/simonmar/fp/bin/i386-unknown-linux/nhc98: test: -ne: unary operator expected ====== Errors after type inference/checking: Type error (type-variable occurrence check fails) when binding final type to function at 5:16. I get the "test: -ne ..." error every time I start nhc98, so it's probably unrelated. I'm not quite sure which version of nhc98 I have here:
nhc98 --version /home/simonmar/fp/bin/i386-unknown-linux/nhc98: 2.01 [ config: ix86-Linux/ by simonmar@cam-01-unx.europe.corp.microsoft.com on 22 Aug 2002 ]
Cheers, Simon

"Simon Marlow"
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
participants (2)
-
Malcolm Wallace
-
Simon Marlow