codec-0.1.1: First-class record construction and bidirectional serialization

Safe HaskellNone
LanguageHaskell2010

Data.Codec.Tuple

Documentation

class Field1 r a x y | r x -> y, r y -> x, r -> a, x y -> r where Source

Methods

f_1 :: Field r a x y Source

Instances

Field1 (a, b) a (a -> a2 -> (a, b)) (X -> a2 -> (a, b)) 

class Field2 r a x y | r x -> y, r y -> x, r -> a, x y -> r where Source

Methods

f_2 :: Field r a x y Source

Instances

Field2 (a, b) b (a1 -> b -> (a, b)) (a1 -> X -> (a, b)) 

c_Left :: Con (Either a b) (a -> Either a b) Source

c_Right :: Con (Either a b) (b -> Either a b) Source

f_left :: Field (Either a b) a (a -> Either a b) (X -> Either a b) Source

f_right :: Field (Either a b) b (b -> Either a b) (X -> Either a b) Source