generics-mrsop-1.2.2: Generic Programming with Mutually Recursive Sums of Products.

Safe HaskellNone
LanguageHaskell2010

Generics.MRSOP.AG

Contents

Description

Attribute grammars over mutual recursive datatypes

Synopsis

Documentation

zipAnn :: forall phi1 phi2 phi3 ki codes ix. (forall iy. phi1 iy -> phi2 iy -> phi3 iy) -> AnnFix ki codes phi1 ix -> AnnFix ki codes phi2 ix -> AnnFix ki codes phi3 ix Source #

mapAnn :: (forall iy. chi iy -> phi iy) -> AnnFix ki codes chi ix -> AnnFix ki codes phi ix Source #

inheritAnn :: forall ki codes chi phi ix. (forall iy. chi iy -> Rep ki (Const ()) (Lkup iy codes) -> phi iy -> Rep ki phi (Lkup iy codes)) -> phi ix -> AnnFix ki codes chi ix -> AnnFix ki codes phi ix Source #

Inherited attributes

inherit :: forall ki phi codes ix. (forall iy. Rep ki (Const ()) (Lkup iy codes) -> phi iy -> Rep ki phi (Lkup iy codes)) -> phi ix -> Fix ki codes ix -> AnnFix ki codes phi ix Source #

synthesizeAnn :: forall ki codes chi phi ix. (forall iy. chi iy -> Rep ki phi (Lkup iy codes) -> phi iy) -> AnnFix ki codes chi ix -> AnnFix ki codes phi ix Source #

Synthesized attributes

synthesize :: forall ki phi codes ix. IsNat ix => (forall iy. IsNat iy => Rep ki phi (Lkup iy codes) -> phi iy) -> Fix ki codes ix -> AnnFix ki codes phi ix Source #

monoidAlgebra :: Monoid m => Rep ki (Const m) xs -> Const m iy Source #

sizeAlgebra :: Rep ki (Const (Sum Int)) xs -> Const (Sum Int) iy Source #

sizeGeneric' :: IsNat ix => Fix ki codes ix -> AnnFix ki codes (Const (Sum Int)) ix Source #

Annotate each node with the number of subtrees

sizeGeneric :: IsNat ix => Fix ki codes ix -> Const (Sum Int) ix Source #

Count the number of nodes

Orphan instances

Show k2 => Show1 k1 (Const k1 k2) Source # 

Methods

show1 :: f k -> String Source #

(Show1 k f, Show1 k g) => Show1 k (Product k f g) Source # 

Methods

show1 :: f k -> String Source #