Idris2Doc : Data.List.Suffix.Result

Data.List.Suffix.Result

(source)

Reexports

importpublic Data.List.Suffix

Definitions

dataResult : Bool-> (t : Type) ->Listt->Type->Type->Type
  Result of consuming and converting a (possibly strict) prefix
of a list of tokens.

This comes with a non-erased proof about the number of tokens
consumed, which can be used to for instance
calculate the bounds of a lexeme. Likewise, the error specifies
a start and end suffix for calculating proper bounds in case
of an error.

Use this for writing simple, high-performance tokenizers, which
(in the case of strict results) are guaranteed to terminate.
See module `Text.Lex.Manual` for
utilities for consuming and converting prefixes
of tokens, but for a nicer interface, consider using `Text.Lex.Tokenizer`
(at the cost of a drop in performance).

@ strict : True if a strict prefix of the list of tokens has
been consumed.
@ t : the type of token consumed.
@ ts : the original list of tokens
@ e : the error type in case of a failure
@ a : the result type

Totality: total
Visibility: public export
Constructors:
Succ : a-> (xs : Listt) ->Suffixbxsts=>Resultbttsea
Fail : SuffixFalsestopStartts-> (0errEnd : Listt) ->SuffixFalseerrEndstopStart=>e->Resultbttsea

Hint: 
Functor (Resultbttse)
succ : a->Suffixbxsts->Resultbttsea
  Alias for `Succ`, which takes the proof as an
explicit argument

Totality: total
Visibility: public export
swapOr : Result (x|| Delay y) ttsea->Result (y|| Delay x) ttsea
Totality: total
Visibility: public export
orSame : Result (x|| Delay x) ttsea->Resultxttsea
Totality: total
Visibility: public export
orTrue : Result (x|| Delay True) ttsea->ResultTruettsea
Totality: total
Visibility: public export
orFalse : Result (x|| Delay False) ttsea->Resultxttsea
Totality: total
Visibility: public export
swapAnd : Result (x&& Delay y) ttsea->Result (y&& Delay x) ttsea
Totality: total
Visibility: public export
andSame : Result (x&& Delay x) ttsea->Resultxttsea
Totality: total
Visibility: public export
andTrue : Result (x&& Delay True) ttsea->Resultxttsea
Totality: total
Visibility: public export
andFalse : Result (x&& Delay False) ttsea->ResultFalsettsea
Totality: total
Visibility: public export
weaken : Resultxttsea->ResultFalsettsea
Totality: total
Visibility: public export
weakens : ResultTruettsea->Resultxttsea
Totality: total
Visibility: public export
and1 : Resultxttsea->Result (x&&y) ttsea
Totality: total
Visibility: public export
and2 : Resultxttsea->Result (y&& Delay x) ttsea
Totality: total
Visibility: public export
trans : Resultb1txsea->Suffixb2xsys->Result (b1|| Delay b2) tysea
Totality: total
Visibility: public export
succT : Resultb1txsea->SuffixTruexsys=>ResultTruetysea
Totality: total
Visibility: public export
succF : Resultb1txsea->SuffixTruexsys=>ResultFalsetysea
Totality: total
Visibility: public export