Proposal: NoImplicitPreludeImport
Tillmann Rendel
rendel at informatik.uni-marburg.de
Wed May 29 12:12:56 CEST 2013
Hi,
Ian Lynagh wrote:
> I have made a wiki page describing a new proposal,
> NoImplicitPreludeImport, which I intend to propose for Haskell 2014:
> http://hackage.haskell.org/trac/haskell-prime/wiki/NoImplicitPreludeImport
I like the idea of having an ImplicitPreludeImport extensions that can
be switched on and off. I'm not sure it should be switched off by default.
For Haskell beginners, I think it is most convenient if they can write
some interesting programs without any imports. This enables learning
some Haskell without learning about modules and imports at all. So I
think that beginners want an implicit import of (some) Prelude.
(Maybe it would be good if tutorials or lecture notes could specify in a
very easy way what Prelude to use exactly. A bit like #lang lines in
Racket).
Advanced Haskell programmers have long import lists and often long
extension lists in their modules anyway, so the additional "import
Prelude ()" or "{-# LANGUAGE NoImplicitPrelude #-}" shouldn't hurt them
so much. Except that currently, "import Prelude ()" doesn't actually
work in practice, because not all Prelude exports are available from
other modules. I think this should be fixed independently of this proposal.
Tillmann
More information about the Haskell-prime
mailing list