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

Joachim Breitner mail at joachim-breitner.de
Thu Oct 15 16:33:27 UTC 2020


Hi,

very well written proposal, the motivation section is exemplary. In
particular excited about the ability to locally open a module
(something that I began to like when writing Ocaml).



> Would it be equivalent to say that all traditional import 
> declarations create local modules?

When reading the proposal, that was somehow automatically my mental
model. So I hope it is true, and that we can explain things this way.

This would actually rule out the alternative
> Drop point (8) allowing extension of existing local modules.
because `import qualified Foo as A; import qualified Bar as A` only
works if local modules can be extended. 



> Should -XLocalModules be required to import a local module?

My gut feeling is yes. The knowledge that `Foo.Bar.baz` comes from an
imported `Foo.Bar` should still be applicable, unless a language
extension clearly tells you that something is different.


So I am supportive. I could understand if someone argued “too big of a
change for too little impact; makes Haskell more complicated” … but I won’t be that someone.


Cheers,
Joachim

-- 
Joachim Breitner
  mail at joachim-breitner.de
  http://www.joachim-breitner.de/




More information about the ghc-steering-committee mailing list