Idris2Doc : Data.Container.Base.Object.Instances

Data.Container.Base.Object.Instances

(source)

Definitions

Const2 : Type->Type->Cont
  Constant (non-dependent) container: positions do not depend on shapes
As a polynomial functor: F(X) = aX^b

Visibility: public export
Const : Type->Cont
  Constant container whose shapes and positions coincide
As a polynomial functor: F(X) = aX^a

Visibility: public export
Nap : Type->Cont
  Naperian container: a constant container with a single shape
As a polynomial functor: F(X) = X^b

Visibility: public export
Flat : Type->Cont
  Flat container: a constant container with a single position
As a polynomial functor: F(X) = aX

Visibility: public export
Sharp : Type->Cont
  Sharp container: a constant container without any positions
As a polynomial functor: F(X) = a

Visibility: public export
Empty : Cont
  Empty container, isomorphic to Void
As a polynomial functor: F(X) = 0
Initial container

Visibility: public export
Scalar : Cont
  Container of a single thing
As a polynomial functor: F(X) = X

Visibility: public export
UnitCont : Cont
  Container with a single shape, but no positions. Isomorphic to Unit : Type
As a polynomial functor: F(X) = 1
Terminal container

Visibility: public export
Pair : Cont
  Product, container of two things
Isomorphic to Scalar >*< Scalar
As a polynomial functor: F(X) = X^2

Visibility: public export
Either : Cont
  Coproduct, container of either one of two things
Isomorphic to Scalar >+< Scalar
As a polynomial functor: F(X) = X + X

Visibility: public export
Maybe : Cont
  Container of either one thing, or nothing
Isomorphic to Scalar >+< UnitCont
Initial algebra is Nat
As a polynomial functor: F(X) = 1 + X

Visibility: public export
MaybeTwo : Cont
  Container of either two things, or nothing
Isomorphic to Pair >+< UnitCont
Initial algebra is BinTreeShape
As a polynomial functor: F(X) = 1 + X^2

Visibility: public export
List : Cont
  List, container with an arbitrary number of things
As a polynomial functor: F(X) = 1 + X + X^2 + X^3 + ...

Visibility: public export
Vect : List.Shp->Cont
  Vect, container of a fixed/known number of things
As a polynomial functor: F(X) = X^n

Visibility: public export
Grid : (List.Shp, List.Shp) ->Cont
  Grid, container of things arranged along two axes
As a polynomial functor: F(X) = X^(hw)

Visibility: public export
Stream : Cont
  Container of an infinite number of things
As a polynomial functor: F(X) = X^Nat

Visibility: public export
BinTree : Cont
  Container of things stored at nodes and leaves of a binary tree
As a polynomial functor: F(X) = 1 + 2X + 3X^2 + 7X^3 + ...

Visibility: public export
BinTreeNode : Cont
  Container of things stored at nodes of a binary tree
As a polynomial functor: F(X) = 1 + X + 2X^2 + 5X^3 +

Visibility: public export
BinTreeLeaf : Cont
  Container of things stored at leaves of a binary tree
As a polynomial functor: F(X) = X + X^2 + 2X^3 + 5X^4 +

Visibility: public export
Tensor : ListCont->Cont
  Tensors are containers
As a polynomial functor: F(X) = ?

Visibility: public export
CartesianTensor : ListCont->Cont
Visibility: public export
HancockTensor : ListCont->Cont
Visibility: public export
CoproductTensor : ListCont->Cont
Visibility: public export
ContUniverse : Cont
  Ignoring universe levels here
This should be the analogue of `Type : Type`

Visibility: public export
Sample : Nat->Cont
  Given a natural number `n`, this is a container whose shape represents a 
distribution over `n` choices, and its position represents the choice made.

Visibility: public export