transformations-0.1.1.0: Generic representation of tree transformations

Safe HaskellSafe-Inferred

Generics.MultiRec.HZip

Synopsis

Documentation

class HZip phi f whereSource

Methods

hzipM :: Monad m => (forall ix. El phi ix => phi ix -> r ix -> r' ix -> m (r'' ix)) -> f r ix -> f r' ix -> m (f r'' ix)Source

Instances

HZip phi U 
Eq a => HZip phi (K a) 
El phi xi => HZip phi (I xi) 
HZip phi f => HZip phi (:.: [] f) 
HZip phi f => HZip phi (C c f) 
HZip phi f => HZip phi (:>: f xi) 
(HZip phi a, HZip phi b) => HZip phi (:*: a b) 
(HZip phi a, HZip phi b) => HZip phi (:+: a b) 

hzip :: (HZip phi f, Monad m) => (forall ix. El phi ix => phi ix -> r ix -> s ix -> t ix) -> phi ix -> f r ix -> f s ix -> m (f t ix)Source

Monadic zip but argument is not monadic

hzip' :: HZip phi f => (forall ix. El phi ix => phi ix -> r ix -> s ix -> t ix) -> phi ix -> f r ix -> f s ix -> f t ixSource

Unsafe zip

combine :: forall phi f r r' m ix. (Monad m, HZip phi f) => (forall ix. El phi ix => phi ix -> r ix -> r' ix -> m ()) -> phi ix -> f r ix -> f r' ix -> m ()Source

Combine two structures monadically only

geq :: (Fam phi, HZip phi (PF phi)) => phi ix -> ix -> ix -> BoolSource

Generic equality

geq' :: (Monad m, Fam phi, HZip phi (PF phi)) => phi ix -> I0 ix -> I0 ix -> m ()Source

Monadic generic equality (just for the sake of the monad!)