Proposal: unify constant functors
wren ng thornton
wren at freegeek.org
Fri May 4 01:05:49 CEST 2012
On 4/30/12 8:05 AM, Andreas Abel wrote:
> On 30.04.12 1:56 PM, Ross Paterson wrote:
>> On Mon, Apr 30, 2012 at 10:55:51AM +0100, Bas van Dijk wrote:
>>> On 30 April 2012 07:33, wren ng thornton<wren at freegeek.org> wrote:
>>>> (1) add the Foldable and Traversable instances to base, and
>
> +1
>
>>>> (2) deprecate transformers:Data.Functor.Constant
>>>
>>> I assume you want to re-export Control.Applicative.Constant from
>>> Data.Functor.Constant and deprecate the whole module as in:
>>>
>>> module Data.Functor.Constant
>>> {-# DEPRECATED "Import Constant from Control.Applicative instead" #-}
>>> ( Constant(..) ) where
>>>
>>> import Control.Applicative
>>
>> Not quite, as the one in Control.Applicative is called Const and the
>> one in Data.Functor.Constant is called Constant. I slightly prefer the
>> full name. Maybe just move Data.Functor.Constant into base (removing
>> the copy in Control.Applicative)?
>
> I'd second that. All I get from Const in Control.Applicative is import
> conflicts. The full name, 'Constant' is better.
I rather prefer the short name m'self. Where do you get the import
conflicts from?
For the record, I'd be fine with moving Data.Functor.Constant to base (I
rather prefer that as the module name, as opposed to exporting it from
Control.Applicative), I was just proposing the smallest change that
would resolve the duplication.
--
Live well,
~wren
More information about the Libraries
mailing list