Idris2Doc : Data.SOP.SOP

Data.SOP.SOP

(source)

Definitions

dataSOP_ : (k : Type) -> (k->Type) ->List (Listk) ->Type
  A sum of products.

The elements of the (inner) products
are applications of the parameter f. The type SOP_ is indexed by the list of
lists that determines the sizes of both the (outer) sum and all the (inner)
products, as well as the types of all the elements of the inner products.

A SOP I reflects the structure of a normal Idris datatype. The sum structure
represents the choice between the different constructors, the product structure
represents the arguments of each constructor.

Totality: total
Visibility: public export
Constructor: 
MkSOP : NS_ (Listk) (NP_kf) kss->SOP_kfkss

Hints:
POP (DecEq.f) kss=>DecEq (SOP_kfkss)
POP (Eq.f) kss=>Eq (SOP_kfkss)
HApk (List (Listk)) (POP_k) (SOP_k)
HCollapsek (List (Listk)) (SOP_k) List
HFoldk (List (Listk)) (SOP_k)
HFunctork (List (Listk)) (SOP_k)
HSequencek (List (Listk)) (SOP_k)
POP (Monoid.f) [ks] =>Monoid (SOP_kf [ks])
POP (Ord.f) kss=>Ord (SOP_kfkss)
POP (Semigroup.f) [ks] =>Semigroup (SOP_kf [ks])
POP (Show.f) kss=>Show (SOP_kfkss)
SOP : (k->Type) ->List (Listk) ->Type
  Type alias for `SOP_` with type parameter `k` being
implicit. This reflects the kind-polymorphic data type
in Haskell.

Totality: total
Visibility: public export
unSOP : SOP_kfkss->NS_ (Listk) (NP_kf) kss
Totality: total
Visibility: public export
mapSOP : (fa->ga) ->SOPfkss->SOPgkss
  Specialiced version of `hmap`

Totality: total
Visibility: public export
hapSOP : POP (\a=>fa->ga) kss->SOPfkss->SOPgkss
  Specialization of `hap`

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

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

Totality: total
Visibility: public export
sequenceSOP : Applicativeg=>SOP (\a=>g (fa)) kss->g (SOPfkss)
  Specialization of `hsequence`

Totality: total
Visibility: public export
collapseSOP : SOP (Ka) kss->Lista
  Specialization of `hcollapse`

Totality: total
Visibility: public export
0InjectionSOP : (k->Type) ->List (Listk) ->Listk->Type
  An injection into an n-ary sum of products takes an n-ary product of
the correct type and wraps it in one of the sum's possible choices.

Totality: total
Visibility: public export
injectionsSOP : NP_ (Listk) (InjectionSOPfkss) kss
  The set of injections into an n-ary sum `NS f ks` can
be wrapped in a corresponding n-ary product.

Totality: total
Visibility: public export
apInjsPOP_ : POPfkss->NP (K (SOPfkss)) kss
  Applies all injections to a product of products of values.

This is not implemented in terms of `injectionsSOP` for the
following reason: Since we have access to the structure
of the product of products and thus `kss`, we do not need a
runtime reference of `kss`. Therefore, when applying
injections to a product of products, prefer this function
over a combination involving `injectionsSOP`.

Totality: total
Visibility: public export
apInjsPOP : POPfkss->List (SOPfkss)
  Alias for `collapseNP . apInjsPOP_`

Totality: total
Visibility: public export
injectSOP : NPfks->Elemkskss=>SOPfkss
  Injects a product into an n-ary sum of products.

Totality: total
Visibility: public export
extractSOP : (0ks : Listk) ->SOPfkss->Elemkskss=>Maybe (NPfks)
  Tries to extract a product of the given type from an
n-ary sum of products.

Totality: total
Visibility: public export