module system bug
Iavor S. Diatchki
diatchki@cse.ogi.edu
Thu, 13 Feb 2003 10:15:02 -0800
hi,
i seem to have run into a module system bug, which is illustrated by the
following example:
module A where
data T = T
module B where
import A hiding (T()) -- note the parens after T
v = T
Hugs complains that "T" is an undefined constructor.
This would be the correct behaviour if T didn't have the
() after it, as both the type and the constructors by the name
T should be hidden. however, the parens indicate that
the type/class T should be hidden, and also all the constructors listed
in the parens. since the constructor T is not listed, it should not be
hidden. basically, if a name has parens after it, it always refers to a
type/class.
this is not a big thing, but is ocasionally useful, and more
importantly, it is nice when one can load a program with both GHC and
Hugs, which i am glad to say happens more and more often.
bye
iavor
--
==================================================
| Iavor S. Diatchki, Ph.D. student |
| Department of Computer Science and Engineering |
| School of OGI at OHSU |
| http://www.cse.ogi.edu/~diatchki |
==================================================