<div dir="ltr"><div class="markdown-here-wrapper" style=""><p style="margin:0px 0px 1.2em!important">Dear all,</p>
<p style="margin:0px 0px 1.2em!important">It is time to review the local modules proposal, from our own Richard Eisenberg, again. In fact it’s been time for a while, and I must apologise to Richard for not having understood that. Sorry, Richard.</p>
<p style="margin:0px 0px 1.2em!important">Link: <a href="https://github.com/ghc-proposals/ghc-proposals/pull/283">https://github.com/ghc-proposals/ghc-proposals/pull/283</a></p>
<p style="margin:0px 0px 1.2em!important">Since the last time, the proposal has been both simplified and made more precise. The main issues solved by this proposal are</p>
<ul style="margin:1.2em 0px;padding-left:2em">
<li style="margin:0.5em 0px">The ability to export qualified names from modules</li>
<li style="margin:0.5em 0px">The ability to define functions with qualified names within a module (<em>e.g.</em> you could have both <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">T.f</code> and <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">U.f</code>).</li>
<li style="margin:0.5em 0px">The ability to locally refer to qualified data as unqualified (suppose <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">Set.map</code> is in scope, then the proposal lets you write <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">let import module Set in map f (map g some_set)</code>.</li>
</ul>
<p style="margin:0px 0px 1.2em!important">I think these are three important issues, and the proposal makes a good case that they ought to be solved together. I also think that the specification is clear and doesn’t leave any dark corner. Caveat: I have contributed to writing the current specification, so I may be missing some flaws.</p>
<p style="margin:0px 0px 1.2em!important">The proposal does introduce a somewhat byzantine semantic difference between <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">module X</code> and <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">module qualified X</code> in export lists. This is to keep the current meaning of <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">module X</code> which is already not very intuitive (cf <a href="https://ro-che.info/articles/2012-12-25-haskell-module-system-p1">https://ro-che.info/articles/2012-12-25-haskell-module-system-p1</a> ). I think this is unavoidable.</p>
<p style="margin:0px 0px 1.2em!important">There are also 3 optional pieces of specification that we are asked to rule on (§4). I’m personally in favour of option 1. I’m weakly in favour of option 3 (with a preference for the variant described in Alternative 7). On the other hand option 2 seems to add a bit too much syntactic subtlety to be worth it (though if we choose option 2, I see no reason not to accept Alternative 3 as well).</p>
<p style="margin:0px 0px 1.2em!important">/Arnaud</p>
<div title="MDH:PGRpdj5EZWFyIGFsbCw8L2Rpdj48ZGl2Pjxicj48L2Rpdj48ZGl2Pkl0IGlzIHRpbWUgdG8gcmV2
aWV3IHRoZSBsb2NhbCBtb2R1bGVzIHByb3Bvc2FsLCBmcm9tIG91ciBvd24gUmljaGFyZCBFaXNl
bmJlcmcsIGFnYWluLiBJbiBmYWN0IGl0J3MgYmVlbiB0aW1lIGZvciBhIHdoaWxlLCBhbmQgSSBt
dXN0IGFwb2xvZ2lzZSB0byBSaWNoYXJkIGZvciBub3QgaGF2aW5nIHVuZGVyc3R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