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 = 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: [EMAIL PROTECTED]



_______________________________________________
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell

Reply via email to