self-import
Duncan Coutts
duncan.coutts at worc.ox.ac.uk
Tue Jan 18 05:30:26 EST 2005
On Tue, 2005-01-18 at 10:13 +0000, Simon Peyton-Jones wrote:
> I think what you want is actually more directly stated thus:
>
> module Doc.Pretty.Long( ... ) as M where
> ...
>
> The 'as M' in the module header gives an alias for Doc.Pretty.Long just
> as it does for an import statement. Simple.
>
> Your scheme had the advantage of no new syntax. I'd be interested to
> know whether lots of people would like 'as M' in the module header, as
> new syntax. A bit more complexity, but perhaps useful.
And if it turns out we are in the mood to look at extending the
inport/export/module syntax perhaps we could also consider the qualified
export idea posted a few weeks ago.
That was so that you could say:
import Graphics.UI.Gtk
and then use Button.setText (rather than buttonSetText) as $DEITY
intended. Down with the moduleNamePrefix! :-)
Duncan
More information about the Glasgow-haskell-users
mailing list