[Haskell-cafe] AlternativePrelude extension

Sjur Gjøstein Karevoll sjurberengal at gmail.com
Fri Jan 15 13:10:00 EST 2010

Here's an idea I'd like to air:

A new extension called AlternativePrelude. Like the NoImplicitPrelude 
extension we have already, this would disable implicitly importing the Prelude 
in every other module, but would also implicitly import a substitute.

The purpose is to make it easier to play around with alternative preludes. 
Today we have to specify NoImplicitPrelude, but also explicitly import our 
alternative everywhere, making the transition between the different preludes 
that much more painful. With this new extension, the alternative prelude can 
be specified in the cabal file, or on the command line when building. This will 
hopefully make the alternative prelude efforts a little bit more mainstream, 
giving us more data we can use to consider modifications to the current 
standard prelude.

I'm thinking the syntax would be something like 
AlternativePrelude="MyPrelude". This is new among the extensions in that it 
requires a parameter.

An alternative is an ImplicitImport extension that doesn't disable the 
implicit importing of the Prelude, but while this does serve the same purpose 
as the AlternativePrelude proposal, I think it might be easier to use it for 
nefarious purposes.

Sjur Gjøstein Karevoll

More information about the Haskell-Cafe mailing list