extensible-sp-0.1.0.0: light-weight, extensible sums and products over types and kinds

Safe HaskellSafe
LanguageHaskell2010

Data.Extensible.Sum2

Documentation

data (f :+: g) a b Source #

Constructors

InL (f a b) 
InR (g a b) 

Instances

(:>+:) c a => Sum2 ((:+:) c b) a Source # 

Methods

peek2 :: (c :+: b) a b -> Maybe (a a b) Source #

lft2 :: a a b -> (c :+: b) a b Source #

Sum2 ((:+:) f g) g Source # 

Methods

peek2 :: (f :+: g) a b -> Maybe (g a b) Source #

lft2 :: g a b -> (f :+: g) a b Source #

class Sum2 c s where Source #

Minimal complete definition

peek2, lft2

Methods

peek2 :: c a b -> Maybe (s a b) Source #

lft2 :: s a b -> c a b Source #

Instances

Sum2 f f Source # 

Methods

peek2 :: f a b -> Maybe (f a b) Source #

lft2 :: f a b -> f a b Source #

(:>+:) c a => Sum2 ((:+:) c b) a Source # 

Methods

peek2 :: (c :+: b) a b -> Maybe (a a b) Source #

lft2 :: a a b -> (c :+: b) a b Source #

Sum2 ((:+:) f g) g Source # 

Methods

peek2 :: (f :+: g) a b -> Maybe (g a b) Source #

lft2 :: g a b -> (f :+: g) a b Source #

type (:>+:) w a = Sum2 w a Source #