qualified type identifiers
Andres Loeh
andres@cs.uu.nl
Fri, 8 Mar 2002 09:59:56 +0100
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