module system/namespaces: separate with/use, allow local "use"

Simon Peyton-Jones simonpj at
Mon Jan 30 04:03:23 EST 2006

| > With the module system, we should make a distinction between
| >
| > (1) that we want to use a module
| > (2) how to bring the module's names into scope
| Perhaps 'import' should be allowed anywhere among definitions.

Indeed.  Requiring the import clauses to be at the top, and the fixity
declarations, makes them easy to find -- but we don't require that for
type signatures or class declarations etc.  It'd be more consistent to
allow imports and fixity declarations anywhere. 

This'd be a backward compatible change, but it's an utterly un-forced
one.  It's not something that people complain about much.


More information about the Haskell-prime mailing list