Idris2Doc : Literal

Literal

Defines `Literal`, a single value or array of values with a specified shape. It is similar to
the `Tensor` type, but differs in a number of important ways:

* `Literal` offers a convenient syntax for constructing `Literal`s with boolean and numeric
  contents. For example, `True`, `1` and `[1, 2, 3]` are all valid `Literal`s. This makes it
  useful for constructing `Tensor`s.
* `Literal` is *not* accelerated by XLA, so operations on large `Literal`s, and large sequences
  of operations on any `Literal`, can be expected to be slower than they would on an equivalent
  `Tensor`.
* A `Literal` is implemented in pure Idris. As such, it can contain elements of any type, and
  implements a number of standard Idris interfaces. This, along with its convenient syntax,
  makes it particularly useful for testing operations on `Tensor`s.

Reexports

importpublic Types

Definitions

dataLiteral : Shape->Type->Type
  A scalar or array of values.

Totality: total
Visibility: public export
Constructors:
Scalar : a->Literal [] a
Nil : Literal (0::ds) a
(::) : Literaldsa->Literal (d::ds) a->Literal (Sd::ds) a

Hints:
Applicative (Literalshape)
Cast (Arrayshapea) (Literalshapea)
Eqa=>Eq (Literalshapea)
Foldable (Literalshape)
Functor (Literalshape)
Numa=>Num (Literal [] a)
Showa=>Show (Literalshapea)
Traversable (Literalshape)
Zippable (Literalshape)
fromInteger : Integer->Literal [] Int32
Totality: total
Visibility: export
fromDouble : Double->Literal [] Double
Totality: total
Visibility: export
True : Literal [] Bool
  Convenience aliases for scalar boolean literals.

Totality: total
Visibility: export
False : Literal [] Bool
  Convenience aliases for scalar boolean literals.

Totality: total
Visibility: export
all : LiteralshapeBool->Bool
  `True` if no elements are `False`. `all []` is `True`.

Totality: total
Visibility: export
negate : Nega=>Literalshapea->Literalshapea
Totality: total
Visibility: export
Fixity Declaration: prefix operator, level 10
dataAll : (0_ : (a->Type)) ->Literalshapea->Type
  An `All p xs` is an array (or scalar) of proofs about each element in `xs`.

For example, an `All IsSucc xs` proves that every element in `xs` is non-zero.

Totality: total
Visibility: public export
Constructors:
Scalar : px->Allp (Scalarx)
Nil : Allp []
(::) : Allpx->Allpxs->Allp (x::xs)