Extensions to the module name system in H2020

Daniel Cartwright chessai1996 at gmail.com
Tue Jul 31 12:51:15 UTC 2018


"There is also the situation where the package name isn’t essential and
shouldn’t get in the way when naming modules. For example, there are a
lot of monad transformers in the world. The `transformers` package
implements some of them; others are added by other packages. It is good
if the module that implements a certain kind of monad transformer has a
name of the form `Control.Monad.Trans.⟨type-of-transformer⟩`. Having the
package name in the module name would be like revealing an
implementation detail."

Not sure I agree that that is necessarily the case.

Transformers.ExceptT
Transformers.ReaderT
These.ChronicleT

This lets me know exactly where these transformers came from, just by
reading the module name.


On Tue, Jul 31, 2018, 8:44 AM Wolfgang Jeltsch <wolfgang-it at jeltsch.info>
wrote:

> Am Montag, den 30.07.2018, 15:03 -0400 schrieb David Menendez:
> > I think there are several ideas being discussed here, and it may be
> > helpful to distinguish them.
> >
> > 1. Two packages may unintentionally include modules with the same
> >    name, making it difficult to use both at once
> > 2. Module names should be organized in some logical manner
> > 3. A package may want to import a module without tying it to a
> >    specific package
>
> There is also the situation where the package name isn’t essential and
> shouldn’t get in the way when naming modules. For example, there are a
> lot of monad transformers in the world. The `transformers` package
> implements some of them; others are added by other packages. It is good
> if the module that implements a certain kind of monad transformer has a
> name of the form `Control.Monad.Trans.⟨type-of-transformer⟩`. Having the
> package name in the module name would be like revealing an
> implementation detail.
>
> All the best,
> Wolfgang
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20180731/b42b0efa/attachment.html>


More information about the Libraries mailing list