regular-0.3.4: Generic programming library for regular datatypes.

Portabilitynon-portable
Stabilityexperimental
Maintainergenerics@haskell.org

Generics.Regular.Functions.LR

Contents

Description

Summary: Generic functionality for regular dataypes: mapM, flatten, zip, equality, show, value generation and fold.

Synopsis

Functions for generating values that are different on top-level

class LRBase a whereSource

The LRBase class defines two functions, leftb and rightb, which should produce different values.

Methods

leftb :: aSource

rightb :: aSource

Instances

class LR f whereSource

The LR class defines two functions, leftf and rightf, which should produce different functorial values.

Methods

leftf :: a -> f aSource

rightf :: a -> f aSource

Instances

LR U 
LR I 
LRBase a => LR (K a) 
LR f => LR (S s f) 
LR f => LR (C c f) 
(LR f, LR g) => LR (:*: f g) 
(LR f, LR g) => LR (:+: f g) 

left :: (Regular a, LR (PF a)) => aSource

Produces a value which should be different from the value returned by right.

right :: (Regular a, LR (PF a)) => aSource

Produces a value which should be different from the value returned by left.