minor errors in Haskell 2010 report

Simon Marlow marlowsd at gmail.com
Fri Aug 24 10:42:05 CEST 2012

On 23/08/2012 17:09, Ramana Kumar wrote:

>     M is not the current module, in which case the only way that an
>     entity could be in scope in the current module is if it was exported
>     by M and subsequently imported by the current module, so adding
>     "exported by module M" is superfluous.
> In this case, what you said is not quite correct: an entity could be in
> scope in the current module if it was defined in the current module, or
> if it was imported from some other module (not M). These are the two
> kinds of entity I thought of when I first read the sentence, and was
> expecting clarification that only ones imported from M are to be considered.

That wouldn't be a clarification, it would be a change in the 
definition.  Remember that entities that are in scope as M.x might not 
come from module M.  Consider:

import X as M

now saying "module M" in the export list will export everything from X. 
  Furthermore, we can export many modules at the same time:

import X as M
import Y as M
import M

and then saying "module M" in the export list will export all of the 
entities from modules X, Y and M.

There was lots of discussion about this in the past, for some tricky 
issues see e.g.



More information about the Haskell-prime mailing list