regular-0.2: Generic programming library for regular datatypes.Source codeContentsIndex
Generics.Regular.Functions.Crush
Portabilitynon-portable
Stabilityexperimental
Maintainergenerics@haskell.org
Contents
Crush functions
Description
Summary: Generic crush.
Synopsis
class Crush f where
crush :: Assoc -> (a -> b -> b) -> b -> f a -> b
flattenl :: Crush f => f a -> [a]
flattenr :: Crush f => f a -> [a]
crushr :: Crush f => (a -> b -> b) -> b -> f a -> b
crushl :: Crush f => (a -> b -> b) -> b -> f a -> b
Crush functions
class Crush f whereSource
The Crush class defines a right-associative crush on functorial values.
Methods
crush :: Assoc -> (a -> b -> b) -> b -> f a -> bSource
show/hide Instances
Crush U
Crush I
Crush (K a)
Crush f => Crush (S s f)
Crush f => Crush (C c f)
(Crush f, Crush g) => Crush (f :*: g)
(Crush f, Crush g) => Crush (f :+: g)
flattenl :: Crush f => f a -> [a]Source
Flatten a structure by collecting all the elements present.
flattenr :: Crush f => f a -> [a]Source
crushr :: Crush f => (a -> b -> b) -> b -> f a -> bSource
crushl :: Crush f => (a -> b -> b) -> b -> f a -> bSource
Produced by Haddock version 2.4.2