Idris2Doc : Data.Uniplate

Data.Uniplate

(source)

Definitions

dataRepr : Type
  How the children of a given node are represented

Totality: total
Visibility: public export
Constructors:
RZero : Repr
ROne : Repr
RTwo : Repr->Repr->Repr

Hints:
Foldable (Childrenrepr)
Functor (Childrenrepr)
Traversable (Childrenrepr)
dataChildren : Repr->Type->Type
  The children of a node

Totality: total
Visibility: public export
Constructors:
Zero : ChildrenRZeroa
One : a->ChildrenROnea
Two : Childrenla->Childrenra->Children (RTwolr) a

Hints:
Foldable (Childrenrepr)
Functor (Childrenrepr)
Traversable (Childrenrepr)
recordPlate : Type->Type->Type
Totality: total
Visibility: public export
Constructor: 
MkPlate : Childrenreprto-> (Childrenreprto->from) ->Platefromto

Projections:
.cs : ({rec:0} : Platefromto) ->Children (repr{rec:0}) to
.gen : ({rec:0} : Platefromto) ->Children (repr{rec:0}) to->from
0.repr : Platefromto->Repr
0.repr : Platefromto->Repr
Totality: total
Visibility: public export
0repr : Platefromto->Repr
Totality: total
Visibility: public export
.cs : ({rec:0} : Platefromto) ->Children (repr{rec:0}) to
Totality: total
Visibility: public export
cs : ({rec:0} : Platefromto) ->Children (repr{rec:0}) to
Totality: total
Visibility: public export
.gen : ({rec:0} : Platefromto) ->Children (repr{rec:0}) to->from
Totality: total
Visibility: public export
gen : ({rec:0} : Platefromto) ->Children (repr{rec:0}) to->from
Totality: total
Visibility: public export
interfaceUniplate : Type->Type
Parameters: ty
Methods:
uniplate : ty->Platetyty
  Get the direct children of a node
and a way to rebuild that node with modified children
descend : (ty->ty) ->ty->ty
descendM : Applicativem=> (ty->mty) ->ty->mty

Implementations:
Uniplate (Lista)
Uniplate (SnocLista)
uniplate : Uniplatety=>ty->Platetyty
  Get the direct children of a node
and a way to rebuild that node with modified children

Totality: total
Visibility: public export
descend : Uniplatety=> (ty->ty) ->ty->ty
Totality: total
Visibility: public export
descendM : Uniplatety=>Applicativem=> (ty->mty) ->ty->mty
Totality: total
Visibility: public export
interfaceBiplate : Type->Type->Type
Parameters: from, to
Constraints: Uniplate to
Methods:
biplate : from->Platefromto
bidescend : (to->to) ->from->from
bidescendM : Applicativem=> (to->mto) ->from->mfrom

Implementations:
Biplate (Lista) a
Biplate (Maybea) a
Biplate (SnocLista) a
Biplate (Vectlena) a
Biplate (List1a) a
BiplateStringChar
biplate : Biplatefromto=>from->Platefromto
Totality: total
Visibility: public export
bidescend : Biplatefromto=> (to->to) ->from->from
Totality: total
Visibility: public export
bidescendM : Biplatefromto=>Applicativem=> (to->mto) ->from->mfrom
Totality: total
Visibility: public export
children : Uniplatety=>ty->Listty
Totality: total
Visibility: public export
plate : from->Platefromto
  Start a new plate, not containing the target

Totality: total
Visibility: public export
(|*) : Plate (to->from) to->to->Platefromto
  The value to the right is the target

Totality: total
Visibility: public export
Fixity Declaration: infixl operator, level 3
(|+) : Biplateitemto=>Plate (item->from) to->item->Platefromto
  The value to the right contains the target
Note: due to https://github.com/idris-lang/Idris2/issues/2737,
you may need to use `assert_total`.

Totality: total
Visibility: public export
Fixity Declaration: infixl operator, level 3
(||+) : {0f : Type->Type} ->Biplate (finner) inner=>Biplateinnerto=>Plate (finner->from) to->finner->Platefromto
  The value to the right contains the target 2 'layers' down
This is equivalent to `|+` using the `Compose` implementation of `Biplate`

Totality: total
Visibility: public export
Fixity Declaration: infixl operator, level 3
(|-) : Plate (item->from) to->item->Platefromto
  The value to the right does not contain the target

Totality: total
Visibility: public export
Fixity Declaration: infixl operator, level 3
plateStar : (to->from) ->to->Platefromto
  Fused form of `plate f |* x`
This replaces an `RTwo RZero ROne` with `ROne`

Totality: total
Visibility: public export
platePlus : Biplateitemto=> (item->from) ->item->Platefromto
  Fused form of `plate f |+ x`
Note: due to https://github.com/idris-lang/Idris2/issues/2737,
you may need to use `assert_total`.

Totality: total
Visibility: public export
plateVia : Biplatesto=> (s->t) -> (t->s) ->t->Platetto
  Create a plate by providing a mapping to or from another type
i.e. a profunctor on `Plate`

Totality: total
Visibility: public export
universe : Uniplatety=>ty->Listty
  Get all children of a node, including the node itself
and non-direct descendents.

Totality: total
Visibility: public export
transform : Uniplatety=> (ty->ty) ->ty->ty
  Apply a function to each sub-node, then to the node itself

Totality: total
Visibility: public export
transformM : Uniplatety=>Monadm=> (ty->mty) ->ty->mty
  Apply a monadic function to each sub-node, then to the node itself

Totality: total
Visibility: public export
biuniverse : Biplatefromto=>from->Listto
  Get all children of a node, including non-direct descendents.

Totality: total
Visibility: public export
bitransform : Biplatefromto=> (to->to) ->from->from
  Apply a function to each sub-node of the target type

Totality: total
Visibility: public export
bitransformM : Biplatefromto=>Monadm=> (to->mto) ->from->mfrom
  Apply a monadic function to each sub-node of the target type

Totality: total
Visibility: public export
fixpoint : Uniplatety=> (ty->Maybety) ->ty->ty
  Find the fixed point of a function applied to every sub-node of a node
This ensures there is nowhere in the node that can have the function applied
ie forall f, x. all (isNothing . f) (universe (fixpoint f x)) = True

You can use `fixAdd` to combine 2 functions
Note: it is up to the user to confirm that this is total
Especially when using `fixAdd`, as there may be subtle conflicts between operations

Visibility: public export
fixAdd : (a->Maybeb) -> (a->Maybeb) ->a->Maybeb
  Combine 2 functions that return `Maybe`
prefering the first one, if both would return `Just`

Totality: total
Visibility: public export
para : Uniplatety=> (ty->Listr->r) ->ty->r
  Perform a fold on a node and it's sub-nodes
This is a paramorphism

Totality: total
Visibility: public export