[ghc-steering-committee] #283: Local modules, recommendation: accept

Simon Marlow marlowsd at gmail.com
Sun Nov 1 10:41:57 UTC 2020


On Wed, 21 Oct 2020 at 07:40, Spiwack, Arnaud <arnaud.spiwack at tweag.io>
wrote:

> Simon (Marlow):
>
> Do I understand correctly that what you are objecting to is the following
> syntax in the proposal
>
>    module M where
>    import module M where
>
> And would rather have
>
>   qualified module M where
>   module M where
>
> To mimic the import declaration behaviour?
>

Yes. And instead of

  import M (module N)
  import M (import module N)

we would write

  import M (qualified module N)
  import M (module N)

It seems to me to be desirable to use the same convention for all of:
  * importing modules at the top level ([import M [qualified])
  * importing a local module (import M ([qualified] module N))
  * declaring a local module ([qualified] module M where ..)
  * exporting a local module (module M ([qualified] module M) where)

and perhaps it would be a source of confusion if these were different, as
in the proposal. (but it's hard to tell, since we don't have any experience
with using the extension yet.)

Richard, what do you think?

Cheers
Simon



> On Sat, Oct 17, 2020 at 9:33 PM Alejandro Serrano Mena <trupill at gmail.com>
> wrote:
>
>> I like the proposal as it stands.
>>
>> El jue., 15 oct. 2020 a las 20:09, Spiwack, Arnaud (<
>> arnaud.spiwack at tweag.io>) escribió:
>>
>>>
>>> In
>>>> particular excited about the ability to locally open a module
>>>> (something that I began to like when writing Ocaml).
>>>>
>>>
>>> It is also one of my favourite features in Ocaml. It's a fairly recent
>>> addition to Ocaml (10ish years ago, I would say?), and I believe it's fair
>>> to say that it had a profound impact on coding style throughout the
>>> community. For the better in my opinion.
>>> _______________________________________________
>>> ghc-steering-committee mailing list
>>> ghc-steering-committee at haskell.org
>>> https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee
>>>
>> _______________________________________________
> ghc-steering-committee mailing list
> ghc-steering-committee at haskell.org
> https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-steering-committee/attachments/20201101/147cff6e/attachment.html>


More information about the ghc-steering-committee mailing list