base package -- goals

Mario Blažević mblazevic at
Tue Mar 12 22:10:21 CET 2013

On 13-03-12 04:47 AM, Joachim Breitner wrote:
> ...
> None of these look particularly appealing. Here some ideas to make it
> more convenient for the programmer that require changes to GHC and how
> it treats packages:
>       I. It automatically imports _all_ visible Prelude modules. So
>          base-pure provides the pure Prelude and base-io adds the IO
>          functions.

	I like this proposal, but it goes further than necessary for your goal, 
and it could lead to some messy conflicts. All you need is

>      2. Prelude goes to a separate shim package, base-prelude. Extra
>         dependency required, packages that want to only depend on
>         base-pure have no Prelude to use, same problem as in 1.

plus the ability to specify, per *user* package, from which package it 
wants to import Prelude. The default would be base-prelude, but a 
single-line change could switch that to base-pure-prelude or 
awesome-alternative-prelude. Presumably ghc-pkg would need a new 
command-line option to specify the Prelude package as well.

More information about the Glasgow-haskell-users mailing list