Idris2Doc : Data.List.Shift

Data.List.Shift

(source)

Definitions

dataShift : Bool-> (t : Type) ->SnocListt->Listt->SnocListt->Listt->Type
  Witness that a pair of a snoclist and a list
is the result of shifting values from the head of
an initial list to the tail of an initial snoclist.

This data type is a witness for what a lexer does:
taking a finite number of elements from the head of a
list and appending them to the tail of a snoclist.

By carrying around such a proof, we guarantee that no
character is lost during lexing, and that the order of
characters does not change during lexing.

@ strict : `True` if at least one element was shifted
@ sx : the current snoclist
@ xs : the current list
@ giro : the initial snoclist
@ orig : the initial list

Totality: total
Visibility: public export
Constructors:
Same : ShiftFalsetsxxssxxs
  Doing nothing results in a non-strict `Shift`
SH : Shiftb1tsx (x::xs) syys->Shiftb2t (sx:<x) xssyys
  We arrive at a new result by shifting one more value.

Hint: 
Cast (Shiftbtsxxssyys) Nat
shift : Shiftbtsc (x::xs) giroorig->ShiftTruet (sc:<x) xsgiroorig
  Strict alias for `SH`

Totality: total
Visibility: public export
toNat : Shiftbtsxxssyys->Nat
  Converts a `Shift` to a natural number, representing
the number of items dropped from the original list.

Performance: This is the identity function at runtime.

Totality: total
Visibility: public export
swapOr : Shift (x|| Delay y) tsxxssyys->Shift (y|| Delay x) tsxxssyys
Totality: total
Visibility: public export
orSame : Shift (x|| Delay x) tsxxssyys->Shiftxtsxxssyys
Totality: total
Visibility: public export
orTrue : Shift (x|| Delay True) tsxxssyys->ShiftTruetsxxssyys
Totality: total
Visibility: public export
orFalse : Shift (x|| Delay False) tsxxssyys->Shiftxtsxxssyys
Totality: total
Visibility: public export
swapAnd : Shift (x&& Delay y) tsxxssyys->Shift (y&& Delay x) tsxxssyys
Totality: total
Visibility: public export
andSame : Shift (x&& Delay x) tsxxssyys->Shiftxtsxxssyys
Totality: total
Visibility: public export
andTrue : Shift (x&& Delay True) tsxxssyys->Shiftxtsxxssyys
Totality: total
Visibility: public export
andFalse : Shift (x&& Delay False) tsxxssyys->ShiftFalsetsxxssyys
Totality: total
Visibility: public export
weaken : Shiftbtsxxssyys->ShiftFalsetsxxssyys
  Every `Shift` can be converted to a non-strict one.

Performance: This is the identity function at runtime.

Totality: total
Visibility: public export
weakens : ShiftTruetsxxssyys->Shiftbtsxxssyys
  A strict `Shift` can be converted to a non-strict one.

Performance: This is the identity function at runtime.

Totality: total
Visibility: public export
suffix : Shiftbtsxxssyys->Suffixbxsys
  A `Shift` can be converted to a `Suffix`.

Performance: This is the identity function at runtime.

Totality: total
Visibility: public export
and1 : Shiftb1tsxxssyys->Shift (b1&&b2) tsxxssyys
Totality: total
Visibility: public export
and2 : Shiftb2tsxxssyys->Shift (b1&& Delay b2) tsxxssyys
Totality: total
Visibility: public export
trans : Shiftb1tsxxssyys->Shiftb2tsyysszzs->Shift (b1|| Delay b2) tsxxsszzs
  `Shift` is a reflexive and transitive relation.

Performance: This is integer addition at runtime.

Totality: total
Visibility: public export