Proposal: NoImplicitPreludeImport

Ben Lippmeier benl at ouroborus.net
Wed May 29 02:41:30 CEST 2013


On 29/05/2013, at 9:02 AM, Ben Franksen wrote:

> Bryan O'Sullivan 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
>>> 
>>> What do you think?
>> 
>> This is a truly terrible idea.
>> 
>> It purports to be a step towards fixing the backwards compatibility
>> problem, but of course it breaks every module ever written along the way,
>> and it means that packages that try to be compatible across multiple
>> versions of GHC will need mandatory CPP #ifdefs for years to come.
> 
> I think it need not necessarily come to that. If we do this right, then 
> adding a line
> 
>  extensions: ImplicitPrelude

You could handle this more generally by implementing a compiler flag that causes modules to be imported.

We've already got  "-package P" for exposing packages, we could add "-module M" for exposing modules.

When compiling with a Haskell2014 compiler just add the "-module Prelude" flag to your Makefile/.cabal file.

Ben.




More information about the Haskell-prime mailing list