Proposal: merge Data.Functor.Coproduct into transformers

Gábor Lehel illissius at gmail.com
Sat Dec 15 19:29:09 CET 2012


On Fri, Dec 14, 2012 at 9:50 PM, Bardur Arantsson <spam at scientician.net> wrote:
> On 12/14/2012 08:37 PM, Mario Blažević wrote:
>>     So far we have a consensus on the proposal (yay!), but no firm
>> agreement on the naming.
>
> Throw some dice?
>

Given that no one has tied their approval to a particular name, what
about giving Ross Paterson, maintainer of transformers, the final
vote?

If I'm not missing one, the possibilities mentioned have been:

newtype Coproduct f g a = Coproduct { getCoproduct :: Either (f a) (g a) }
data Sum f g a = SumLeft (f a) | SumRight (g a)
data Coproduct f g a = InL (f a) | InR (g a)
data Sum f g a = InL (f a) | InR (g a)
data Coproduct f g a = LeftF (f a) | RightF (g a)
data EitherF f g a = LeftF (f a) | RightF (g a)
data Either1 f g a = Left1 (f a) | Right1 (g a)
data Either f g a = Left (f a) | Right (g a) -- import qualified

-- 
Your ship was destroyed in a monadic eruption.



More information about the Libraries mailing list