[Haskell] A puzzle and an annoying feature

Graham Klyne gk at ninebynine.org
Fri Nov 26 06:27:17 EST 2004

At 19:14 25/11/04 +0100, Lennart Augustsson wrote:
>Graham Klyne wrote:
>>I have a concern with this, if I understand the issue correctly.
>>Suppose I have a source module that compiles and runs correctly.
>>Now suppose I add a restricted (selective) import statement to the file, 
>>explicitly introducing a name that I know does not clash with anything in 
>>my module.  I expect the module to continue to compile and run correctly.
>>If I understand Lennart's proposal correctly, adding such an import could 
>>cause the compilation to fail, by adding new instance options that then 
>>needs to be disambiguated.
>Not in my particular case.  The class is local to the module.  Any
>instance declaration would have to be in that module.

OK, I missed that.

But, it seems to me, that adding export of the class concerned to the 
module heading could raise a similar scenario to that mentioned.  It's less 
clear-cut, but it seems  surprising to me that the choice of whether or not 
to export something from a module should (potentially) change its meaning 
or validity.


Graham Klyne
For email:

More information about the Haskell mailing list