Proposal: Export String from Data.String (and two related proposals)

Bas van Dijk v.dijk.bas at gmail.com
Wed Nov 17 17:06:30 EST 2010


On Wed, Nov 17, 2010 at 9:46 PM, Duncan Coutts
<duncan.coutts at googlemail.com> wrote:
>> If we accept 3 then in the spirit of  "export a symbol from as few modules
>> as possible", you may expect a fourth proposal: Unexport the String
>> operations: lines, words, unlines and unwords from Data.List.
>> However I think this will break lots of programs. I have no problem also
>> discussing this one though.
>
> Yeah, I agree in principle, but probably best to leave that for later.

It obviously needs to go through a deprecation phase.

It would be great if we could {-# DEPRECATE #-} an export?

So something like:

module Data.List
  (  ...
  {-# DEPRECATE lines "Exported from Data.String instead" #-}
  , lines
  ...
  ) where
...
lines = ...
...

Alternatively, we could just {-# DEPRECATE #-} the functions in
Data.List and define equivalently named new ones in Data.String.

What about doing this for a base-4.3.1 ?

Regards,

Bas


More information about the Libraries mailing list