[Haskell-cafe] ANNOUNCE: new bridge! (prelude-prime)

Joachim Breitner mail at joachim-breitner.de
Thu May 23 11:26:26 CEST 2013


HI,

Am Donnerstag, den 23.05.2013, 12:38 +0400 schrieb Anton Kholomiov:
> I wish it was possible to use an extension
> 
> CustomPrelude = Prelude.Prime
> 
> In the cabal file

as far as I know, GHC simply issues an implicit

import Prelude

without package qualifiers. So you can get what you want by not
depending on base, but rather have prelude-prime re-export all modules
from base plus its own Preldue.

A more modular variant would be to have a package "preludeless-base"
which re-exports all modules from base but the prelude. Then you can
select which prelude you want simply by depending on preludeless-base
(instead of base) plus a package (say prelude-prime) which exports a
module named Prelude.

If prelude-prime itself wants to use base, it can still use
package-qualified imports. Or it could itself be based on
preludeless-base.

Greetings,
Joachim


-- 
Joachim "nomeata" Breitner
Debian Developer
  nomeata at debian.org | ICQ# 74513189 | GPG-Keyid: 4743206C
  JID: nomeata at joachim-breitner.de | http://people.debian.org/~nomeata

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20130523/20f927f0/attachment.pgp>


More information about the Haskell-Cafe mailing list