Idris2Doc : Data.Coproduct

Data.Coproduct

(source)

Reexports

importpublic Data.Ops

Definitions

data(+) : Type->Type->Type
  co-products

Totality: total
Visibility: public export
Constructors:
(<+) : a->a+b
  Left choice
(+>) : b->a+b
  Right choice

Hints:
Alternative ((() +))
Applicative ((a+))
Bifunctor(+)
Functor ((a+))
Injective(<+)
Injective(+>)
Monad ((a+))
Showa=>Showb=>Show (a+b)

Fixity Declaration: infixl operator, level 8
choice : (a->c) -> (b->c) ->a+b->c
  Eliminator for co-products

Totality: total
Visibility: public export
dchoice : {0m : a+b->Type} -> ((x : a) ->m ((<+)x)) -> ((x : b) ->m ((+>)x)) -> (e : a+b) ->me
Totality: total
Visibility: public export
dia : a+a->a
Totality: total
Visibility: public export
Sum : Nat->Type->Type
  A sum of `n` values of type `a`

Totality: total
Visibility: public export
SumList : ListType->Type
Totality: total
Visibility: public export
match : SumLista->SumListb->SumList (a++b)
Totality: total
Visibility: public export
split : SumList (a++b) ->SumLista+SumListb
Totality: total
Visibility: export
Selector : Nat->Type->Type
  A selector is a pair of a fin n and a value of type a the Fin allows to
pick where in a sum of `n` values of `a` the value fit.

Totality: total
Visibility: public export
finToSum : Selectorna->Sumna
  Convert from a selector to a sum of a

Totality: total
Visibility: public export
diagonal : (n : Nat) ->Sumna->a
  Diagonal operator on a sum of `n` values of `a`

Totality: total
Visibility: export
sumToSelector : Sumna-> (Finn, a)
  Convert a sum of n values of a into a pair that records which values of `a` was in the sum in a fin

Totality: total
Visibility: export
ChoiceN : (n : Nat) -> (a->Type) ->Sumna->Type
  A dependent choice from `n` values of `a`

Totality: total
Visibility: public export
diaChoice : (c : Sumna) ->b->ChoiceNn (constb) c
Totality: total
Visibility: export
fromMaybe : Maybea-> () +a
Totality: total
Visibility: public export
swap : a+b->b+a
Totality: total
Visibility: public export
alwaysLeft : a+Void->a
  Extract the left value

Totality: total
Visibility: public export
alwaysRight : Void+b->b
  Extract the right value

Totality: total
Visibility: public export