Idris2Doc : Data.SOP.POP

Data.SOP.POP

(source)

Definitions

dataPOP_ : (k : Type) -> (k->Type) ->List (Listk) ->Type
  A product of products.

The elements of the inner products are
applications of the parameter f. The type POP is indexed by the list of lists
that determines the lengths of both the outer and all the inner products, as
well as the types of all the elements of the inner products.

A POP is reminiscent of a two-dimensional table (but the inner lists can all be
of different length). In the context of the SOP approach to
generic programming, a POP is useful to represent information
that is available for all arguments of all constructors of a datatype.

Totality: total
Visibility: public export
Constructor: 
MkPOP : NP_ (Listk) (NP_kf) kss->POP_kfkss

Hints:
POP (DecEq.f) kss=>DecEq (POP_kfkss)
POP (Eq.f) kss=>Eq (POP_kfkss)
HApk (List (Listk)) (POP_k) (POP_k)
HApk (List (Listk)) (POP_k) (SOP_k)
HCollapsek (List (Listk)) (POP_k) (List.List)
HFoldk (List (Listk)) (POP_k)
HFunctork (List (Listk)) (POP_k)
HPurek (List (Listk)) (POP_k)
HSequencek (List (Listk)) (POP_k)
POP (Monoid.f) kss=>Monoid (POP_kfkss)
POP_k (c.f) kss-> (NP_k (c.f) ks=>c (NP_kfks)) =>NP_ (Listk) (c.NP_kf) kss
POP (Ord.f) kss=>Ord (POP_kfkss)
POP (Semigroup.f) kss=>Semigroup (POP_kfkss)
POP (Show.f) kss=>Show (POP_kfkss)
POP : (k->Type) ->List (Listk) ->Type
  Type alias for `POP_` with type parameter `k` being
implicit. This reflects the kind-polymorphic data type
in Haskell.

Totality: total
Visibility: public export
unPOP : POP_kfkss->NP_ (Listk) (NP_kf) kss
Totality: total
Visibility: public export
mapPOP : (fa->ga) ->POPfkss->POPgkss
  Specialiced version of `hmap`

Totality: total
Visibility: public export
purePOP : fa->POPfkss
  Specialization of `hpure`.

Totality: total
Visibility: public export
hapPOP : POP (\a=>fa->ga) kss->POPfkss->POPgkss
  Specialization of `hap`.

Totality: total
Visibility: public export
foldlPOP : (acc->el->acc) ->acc->POP (Kel) kss->acc
  Specialization of `hfoldl`

Totality: total
Visibility: public export
foldrPOP : (el-> Lazy acc->acc) -> Lazy acc->POP (Kel) kss->acc
  Specialization of `hfoldr`

Totality: total
Visibility: public export
sequencePOP : Applicativeg=>POP (\a=>g (fa)) kss->g (POPfkss)
  Specialization of `hsequence`

Totality: total
Visibility: public export
collapsePOP : POP (Ka) kss->List (Lista)
  Specialization of `hcollapse`

Totality: total
Visibility: public export
ordToEqPOP : POP (Ord.f) kss->POP (Eq.f) kss
  This is needed to implement `Ord` below.

Totality: total
Visibility: public export
monoidToSemigroupPOP : POP (Monoid.f) kss->POP (Semigroup.f) kss
  This is needed to implement `Monoid` below.

Totality: total
Visibility: public export
popToNP : POP_k (c.f) kss-> (NP_k (c.f) ks=>c (NP_kfks)) =>NP_ (Listk) (c.NP_kf) kss
  Converts a POP of constraints to an n-ary sum
holding constrains about the inner n-ary sum.

Example : POP Eq typess -> NP (Eq . NP I) typess

In the example above, we convert a POP of `Eq` instances
into an n-ary sum of Eq instances of the inner products.
This allows us to for instance implent `Eq (POP f kss) ` below
via a direct call to (==) specialized to Eq (NP (NP f) kss).

Totality: total
Visibility: public export