[Haskell-cafe] Proposal for an extension: in-module namespaces

Jannis Limperg jannis at limperg.de
Tue Mar 28 14:53:53 UTC 2017

> I've been thinking about an extension to GHC which would allow creating new
> module-like namespaces within normal Haskell modules. Because this kind of
> namespacing system seems quite obvious to me, I ask if it has already been
> proposed or discussed in detail?

Take a look at Agda's module system as described in the user
documentation[1] and Norell's PhD thesis[2]. It supports the features
you propose, along with lightweight parameterised modules (subsuming
Joachim's "context fixes" proposal) and some additional stuff. At the
same time, it doesn't buy into the complexity of ML-style generative
module functors, which I think is a good tradeoff.

[1] http://agda.readthedocs.io/en/v2.5.2/language/module-system.html
[2] http://www.cse.chalmers.se/~ulfn/papers/thesis.pdf (PDF)


More information about the Haskell-Cafe mailing list