Management of the branching alternatives for parsing an input string.
Parses input0 with p.
This implements the pickstd/text/parse/pick: () -> parse bool ctl using a depth-first search,
short-circuiting if the Truestd/core/types/True: bool branch succeeds.
If both alternatives of a pickstd/text/parse/pick: () -> parse bool invoke failstd/text/parse/fail: forall<a> (msg : string) -> parse a,
the first error will be returned.
Result of a parse.
Automatically generated. Retrieves the rest constructor field of the parse-errorstd/text/parse/parse-error: V -> V type.
Automatically generated. Tests for the ParseErrorstd/text/parse/ParseError: forall<a> (msg : string, rest : sslice) -> parse-error<a> constructor of the parse-errorstd/text/parse/parse-error: V -> V type.
Automatically generated. Tests for the ParseOkstd/text/parse/ParseOk: forall<a> (result : a, rest : sslice) -> parse-error<a> constructor of the parse-errorstd/text/parse/parse-error: V -> V type.
A function that parses some input into a result a.
The current position of parse on the input.
Call the fun current-inputstd/text/parse/current-input: () -> parse sslice operation of the effect parsestd/text/parse/parse: (E, V) -> V.
Fails the current branch of parsing.
Call the final ctl failstd/text/parse/fail: forall<a> (msg : string) -> parse a operation of the effect parsestd/text/parse/parse: (E, V) -> V.
The manystd/text/parse/many: forall<a,e> (p : parser<e,a>) -> <parse|e> list<a> combinator parses p until it fails, returning a list of the results of p.
The manystd/text/parse/many: forall<a,e> (p : parser<e,a>) -> <parse|e> list<a> combinator is non-divergent only when p always consumes input or failstd/text/parse/fail: forall<a> (msg : string) -> parse as.
The many1std/text/parse/many1: forall<a,e> (p : parser<e,a>) -> <parse|e> list<a> combinator parses p at least once and then until it fails, returning a list of the results of p.
The many1std/text/parse/many1: forall<a,e> (p : parser<e,a>) -> <parse|e> list<a> combinator is non-divergent only when p always consumes input or failstd/text/parse/fail: forall<a> (msg : string) -> parse as.
Handlers usually resume up to twice with Truestd/core/types/True: bool and Falsestd/core/types/False: bool.
Call the ctl pickstd/text/parse/pick: () -> parse bool operation of the effect parsestd/text/parse/parse: (E, V) -> V.
See also satisfy-failstd/text/parse/satisfy-fail: forall<a> (msg : string, pred : (sslice) -> maybe<(a, sslice)>) -> parse a which invokes failstd/text/parse/fail: forall<a> (msg : string) -> parse a when pred returns Nothingstd/core/types/Nothing: forall<a> maybe<a>.
Call the fun satisfystd/text/parse/satisfy: forall<a> (pred : (sslice) -> maybe<(a, sslice)>) -> parse maybe<a> operation of the effect parsestd/text/parse/parse: (E, V) -> V.
The sep-bystd/text/parse/sep-by: forall<a,b,e> (p : parser<e,a>, sep : parser<e,b>) -> <parse|e> list<a> parses zero or more occurrences of p, separated by sep. Returns a list of the results of p.
The sep-bystd/text/parse/sep-by: forall<a,b,e> (p : parser<e,a>, sep : parser<e,b>) -> <parse|e> list<a> combinator is non-divergent only when p always consumes input or failstd/text/parse/fail: forall<a> (msg : string) -> parse as.
The sep-by1std/text/parse/sep-by1: forall<a,b,e> (p : parser<e,a>, sep : parser<e,b>) -> <parse|e> list<a> parses one or more occurrences of p, separated by sep. Returns a list of the results of p.
The sep-by1std/text/parse/sep-by1: forall<a,b,e> (p : parser<e,a>, sep : parser<e,b>) -> <parse|e> list<a> combinator is non-divergent only when p always consumes input or failstd/text/parse/fail: forall<a> (msg : string) -> parse as.
Parser combinators
.