linnet-0.3.0.0: Lightweight library for building HTTP API

Safe HaskellSafe
LanguageHaskell2010

Linnet.Internal.Coproduct

Synopsis

Documentation

data Coproduct a b where Source #

Constructors

Inl :: a -> Coproduct a b 
Inr :: b -> Coproduct a b 
Instances
(Eq a, Eq b) => Eq (Coproduct a b) Source # 
Instance details

Defined in Linnet.Internal.Coproduct

Methods

(==) :: Coproduct a b -> Coproduct a b -> Bool #

(/=) :: Coproduct a b -> Coproduct a b -> Bool #

type (:+:) a b = Coproduct a b infixr 9 Source #

Type operator for Coproduct type

data CNil Source #

Instances
Eq CNil Source # 
Instance details

Defined in Linnet.Internal.Coproduct

Methods

(==) :: CNil -> CNil -> Bool #

(/=) :: CNil -> CNil -> Bool #

class AdjoinCoproduct cs c | cs -> c where Source #

Flatten nested coproduct

Methods

adjoinCoproduct :: cs -> c Source #

Instances
AdjoinCoproduct' (AdjoinCoproductT cs) cs c => AdjoinCoproduct cs c Source # 
Instance details

Defined in Linnet.Internal.Coproduct

Methods

adjoinCoproduct :: cs -> c Source #