RE: Haskell98 undefinedness
Yes, it's the same as exporting just B(..) or B(C). I guess I should try to make this clearer. S | -----Original Message----- | From: Sigbjorn Finne [mailto:sof@galconn.com] | Sent: 11 September 2001 20:31 | To: haskell@haskell.org | Subject: Haskell98 undefinedness | | | What's the meaning of | | module A (B, B(..)) where { data B = C }; | | Is or isn't C exported? i.e., the H98 report is silent | about what it means to have entity duplicates in | an export list, possibly with different 'visibility' | modifiers. | | --sigbjorn | | | | _______________________________________________ | Haskell mailing list | Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell |
So, it's not considered an error if you do something like module A ( B(C), ...some other stuff..., B(D) ) where ... data B = C | D but C and D is exported. Is the extra flexibility of allowing duplicates really worth it? --sigbjorn ----- Original Message ----- From: "Simon Peyton-Jones" <simonpj@microsoft.com> To: "Sigbjorn Finne" <sof@galconn.com>; <haskell@haskell.org> Sent: Wednesday, September 12, 2001 00:59 Subject: RE: Haskell98 undefinedness
Yes, it's the same as exporting just B(..) or B(C). I guess I should try to make this clearer.
S
| -----Original Message----- | From: Sigbjorn Finne [mailto:sof@galconn.com] | Sent: 11 September 2001 20:31 | To: haskell@haskell.org | Subject: Haskell98 undefinedness | | | What's the meaning of | | module A (B, B(..)) where { data B = C }; | | Is or isn't C exported? i.e., the H98 report is silent | about what it means to have entity duplicates in | an export list, possibly with different 'visibility' | modifiers. | | --sigbjorn | | | | _______________________________________________ | Haskell mailing list | Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell |
hello, On Wed, Sep 12, 2001 at 08:51:20AM -0700, Sigbjorn Finne wrote:
So, it's not considered an error if you do something like
module A ( B(C), ...some other stuff..., B(D) ) where ... data B = C | D
but C and D is exported. Is the extra flexibility of allowing duplicates really worth it?
although this is a little strange i think it should be allowed (an implementation could still produce a warning). here is an example of a simillar situation, where it is not as obvious that constructors of the same datatype are being exported. --------------- module A where data T = C | D --------------- ------------------------- module B (module A) where import A ------------------------- --------------------------------- module C ( A.T(C), B.T(D) ) where import A import B --------------------------------- bye iavor
participants (3)
-
Iavor S. Diatchki -
Sigbjorn Finne -
Simon Peyton-Jones