Another question wrt hiding imports
Wolfgang Lux
wlux@uni-muenster.de
Thu, 12 Jul 2001 15:26:08 +0200
After the recent discussion import hiding clauses in import =
declarations, I was wondering what the meaning of hiding clauses is in =
the case of algebraic data types (or classes).
For instance if a have
module A where
data T =3D A | B
which entities are imported when I include the declaration
import A hiding(T)
in a module? The report is not clear about this but I would expect that =
this imports data constructors A and B into the current module but not =
the type constructor T -- otherwise, what would be the meaning of =
import A hiding(T(B))?
However, if this is true it is possible to export data constructors =
without their type via
module B(module A) where
import A hiding(T)
which contradicts the statement in section 5.2 on p.64, that the form =
module m is equivalent to listing all entities imported from that =
module, because I cannot list a data constructor (without its type) in an=
=
export specification.
Wolfgang
--
Wolfgang Lux Phone: +49-251-83-38263
Institut fuer Wirtschaftinformatik FAX: +49-251-83-38259
Universitaet Muenster Email: wlux@uni-muenster.de