qualified type identifiers
Fri, 8 Mar 2002 09:59:56 +0100
the following module does not compile with Hugs Dec 2001 (and Feb
module HugsQ where
data T = Q
v :: HugsQ.T
v = HugsQ.Q
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.
Andres Loeh, Universiteit Utrecht