[nhc-bugs] Duplicated type variable

Arjan van IJzendoorn afie@cs.uu.nl
Tue, 18 Mar 2003 18:21:46 +0100


Hello NHC people,

I've just succesfully built NHC under Cygwin + Windows 2K. Works perfectly!
I did this to evaluate the error messages NHC produces. I see that you
maintain lines and columns in your messages. That's too bad, because I
thought we were the only ones with Helium :-)

However, the first program I tried to compile gave no errors, while it
should have:

--
data A a a = A a
main = putStrLn "hello"
--

[/cygdrive/c/docs] nhc98 NHCTest.hs

[/cygdrive/c/docs] ./a.out
hello

[/cygdrive/c/docs] ghc NHCTest.hs
NHCTest.hs:1:
    Conflicting definitions for `a'
    In the data type declaration for `A'

[/cygdrive/c/docs] helium NHCTest.hs
Compiling NHCTest.hs
(1,8), (1,10): Duplicated type variable "a"
Compilation failed with 1 error

I didn't find this bug in the list of known bugs.

Cheers, Arjan