[Haskell-cafe] Feature Proposal: GHC Flag for implicit external Prelude

Vo Minh Thu noteed at gmail.com
Tue Jul 15 18:41:03 UTC 2014

2014-07-15 20:34 GMT+02:00 Bardur Arantsson <spam at scientician.net>:
> On 2014-07-15 19:30, Michael Orlitzky wrote:
>> On 07/14/2014 11:23 PM, Andrew Gibiansky wrote:
>>> Hey all,
>>> I would like to propose a very minor flag to add to GHC. I would like
>>> GHC to have a --with-prelude flag, which would specify an alternate
>>> Prelude to use instead of the default Haskell prelude.
>>> This would have an effect similar to -XNoImplicitPrelude and an additional
>>> import MyNewPrelude
>>> in the source file. It might be a /little/ different semantically, as a
>>> qualified import would disable the original implicit import, just like
>>> it does with the default Haskell prelude.
> [--snip--]
>> We went down this road once before with -fglasgow-exts. Eventually, we
>> all realized it was much better to place the required extensions in
>> pragmas at the top of the file.
> Except "we" don't :). "We" use flags in the .cabal file. Or, at least I
> do. Explicitness certainly sometimes has great value, but not always.

And the problem exists already for other modules than Prelude, i.e.
different libraries can export the same modules. The libraries are
selected via cabal or via package-qualified imports (and I think the
former is preferred).

More information about the Haskell-Cafe mailing list