Hello there, the following module does not compile with Hugs Dec 2001 (and Feb 2001): -- start module HugsQ where data T = Q v :: HugsQ.T v = HugsQ.Q -- stop Fails with: ERROR "HugsQ.hs":5 - Undefined type constructor "HugsQ.T" GHC compiles it without error, and the Haskell Report states in Section 5.5.1 (Qualified names): "A qualified name is brought into scope: o By a top level declaration. A top-level declaration brings into scope both the unqualified and the qualified name of the entity being defined. Thus: [...]" Although the example is given in terms of a function binding, I would see the data declaration as just another top-level declaration defining entities "T" and "Q". I could not find anything in the differences to Standard Haskell in the Hugs User's Guide, so I guess it is a bug. Thanks in advance for looking at it. Best, Andres -- Andres Loeh, Universiteit Utrecht mailto:andres@cs.uu.nl mailto:mail@andres-loeh.de http://www.andres-loeh.de
Hi,
thanks for the report. This one was fixed not long after
the Dec 2001 release.
--sigbjorn
----- Original Message -----
From: "Andres Loeh"
Hello there,
the following module does not compile with Hugs Dec 2001 (and Feb 2001):
-- start module HugsQ where
data T = Q
v :: HugsQ.T v = HugsQ.Q -- stop
Fails with:
ERROR "HugsQ.hs":5 - Undefined type constructor "HugsQ.T"
GHC compiles it without error, and the Haskell Report states in Section 5.5.1 (Qualified names):
"A qualified name is brought into scope:
o By a top level declaration. A top-level declaration brings into scope both the unqualified and the qualified name of the entity being defined. Thus:
[...]"
Although the example is given in terms of a function binding, I would see the data declaration as just another top-level declaration defining entities "T" and "Q".
I could not find anything in the differences to Standard Haskell in the Hugs User's Guide, so I guess it is a bug.
Thanks in advance for looking at it.
Best, Andres
--
Andres Loeh, Universiteit Utrecht
mailto:andres@cs.uu.nl mailto:mail@andres-loeh.de http://www.andres-loeh.de _______________________________________________ Hugs-Bugs mailing list Hugs-Bugs@haskell.org http://www.haskell.org/mailman/listinfo/hugs-bugs
participants (2)
-
Andres Loeh -
Sigbjorn Finne