std/text/parse▲toc

Parser combinators

.

type parsestd/text/parse/parse: (E, V) -> V<e,a>

Operations:

fun satisfy
ctl fail
ctl pick
fun current-input
fun satisfystd/text/parse/satisfy: forall<a> (pred : (sslice) -> maybe<(a, sslice)>) -> parse maybe<a>
ctl failstd/text/parse/fail: forall<a> (msg : string) -> parse a
ctl pickstd/text/parse/pick: () -> parse bool
fun current-inputstd/text/parse/current-input: () -> parse sslice
.

type parse-errorstd/text/parse/parse-error: V -> V<a>
con ParseOk(result : arest : sslicestd/core/sslice/sslice: V)

Automatically generated. Retrieves the rest constructor field of the parse-errorstd/text/parse/parse-error: V -> V type.

alias parserstd/text/parse/parser: (E, V) -> V<e,a> = () -> <parsestd/text/parse/parse: (E, V) -> V|e> a
fun (||)( p1 : parserstd/text/parse/parser: (E, V) -> V<e,a>, p2 : parserstd/text/parse/parser: (E, V) -> V<e,a> ) : <parsestd/text/parse/parse: (E, V) -> V|e> a
fun alpha(): parsestd/text/parse/parse: (E, V) -> V charstd/core/types/char: V
fun alpha-num(): parsestd/text/parse/parse: (E, V) -> V charstd/core/types/char: V
fun char( c : charstd/core/types/char: V ) : parsestd/text/parse/parse: (E, V) -> V charstd/core/types/char: V
fun char-is( msg : stringstd/core/types/string: V, pred : (charstd/core/types/char: V) -> boolstd/core/types/bool: V ) : parsestd/text/parse/parse: (E, V) -> V charstd/core/types/char: V
fun chars-are( msg : stringstd/core/types/string: V, pred : (charstd/core/types/char: V) -> boolstd/core/types/bool: V ) : parsestd/text/parse/parse: (E, V) -> V liststd/core/types/list: V -> V<charstd/core/types/char: V>
fun choose( ps : liststd/core/types/list: V -> V<parserstd/text/parse/parser: (E, V) -> V<e,a>> ) : <parsestd/text/parse/parse: (E, V) -> V|e> a
fun count( n : intstd/core/types/int: V, p : parserstd/text/parse/parser: (E, V) -> V<e,a> ) : <parsestd/text/parse/parse: (E, V) -> V|e> liststd/core/types/list: V -> V<a>
fun current-input(): parsestd/text/parse/parse: (E, V) -> V sslicestd/core/sslice/sslice: V

Call the fun current-inputstd/text/parse/current-input: () -> parse sslice operation of the effect parsestd/text/parse/parse: (E, V) -> V.

fun digit(): parsestd/text/parse/parse: (E, V) -> V intstd/core/types/int: V
fun digits(): parsestd/text/parse/parse: (E, V) -> V stringstd/core/types/string: V
fun digits0(): parsestd/text/parse/parse: (E, V) -> V stringstd/core/types/string: V
fun eof(): parsestd/text/parse/parse: (E, V) -> V ()
fun fail( msg : stringstd/core/types/string: V ) : parsestd/text/parse/parse: (E, V) -> V a

Call the ctl failstd/text/parse/fail: forall<a> (msg : string) -> parse a operation of the effect parsestd/text/parse/parse: (E, V) -> V.

fun hex-digits(): parsestd/text/parse/parse: (E, V) -> V stringstd/core/types/string: V
fun many( p : parserstd/text/parse/parser: (E, V) -> V<e,a> ) : <parsestd/text/parse/parse: (E, V) -> V|e> liststd/core/types/list: V -> V<a>

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.

fun many1( p : parserstd/text/parse/parser: (E, V) -> V<e,a> ) : <parsestd/text/parse/parse: (E, V) -> V|e> liststd/core/types/list: V -> V<a>

The many1std/text/parse/many1: forall<a,e> (p : parser<e,a>) -> <parse|e> list<a> combinator parses p at least once an 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.

fun no-digit(): parsestd/text/parse/parse: (E, V) -> V charstd/core/types/char: V
fun none-of( chars : stringstd/core/types/string: V ) : parsestd/text/parse/parse: (E, V) -> V charstd/core/types/char: V
fun none-of-many1( chars : stringstd/core/types/string: V ) : parsestd/text/parse/parse: (E, V) -> V stringstd/core/types/string: V
fun one-of( chars : stringstd/core/types/string: V ) : parsestd/text/parse/parse: (E, V) -> V charstd/core/types/char: V
fun one-of-or( chars : stringstd/core/types/string: V, default : charstd/core/types/char: V ) : parsestd/text/parse/parse: (E, V) -> V charstd/core/types/char: V
fun optional( default : a, p : parserstd/text/parse/parser: (E, V) -> V<e,a> ) : <parsestd/text/parse/parse: (E, V) -> V|e> a
fun pick(): parsestd/text/parse/parse: (E, V) -> V boolstd/core/types/bool: V

Call the ctl pickstd/text/parse/pick: () -> parse bool operation of the effect parsestd/text/parse/parse: (E, V) -> V.

fun pint(): parsestd/text/parse/parse: (E, V) -> V intstd/core/types/int: V
fun pnat(): parsestd/text/parse/parse: (E, V) -> V intstd/core/types/int: V
fun pstring( s : stringstd/core/types/string: V ) : parsestd/text/parse/parse: (E, V) -> V stringstd/core/types/string: V
fun satisfy( pred : (sslicestd/core/sslice/sslice: V) -> maybestd/core/types/maybe: V -> V<(a, sslicestd/core/sslice/sslice: V)> ) : parsestd/text/parse/parse: (E, V) -> V maybestd/core/types/maybe: V -> V<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.

fun satisfy-fail( msg : stringstd/core/types/string: V, pred : (sslicestd/core/sslice/sslice: V) -> maybestd/core/types/maybe: V -> V<(a, sslicestd/core/sslice/sslice: V)> ) : parsestd/text/parse/parse: (E, V) -> V a
fun sign(): parsestd/text/parse/parse: (E, V) -> V boolstd/core/types/bool: V
fun starts-with( s : stringstd/core/types/string: V, p : () -> parsestd/text/parse/parse: (E, V) -> V a ) : maybestd/core/types/maybe: V -> V<(a, sslicestd/core/sslice/sslice: V)>
fun white(): parsestd/text/parse/parse: (E, V) -> V charstd/core/types/char: V
fun whitespace(): parsestd/text/parse/parse: (E, V) -> V stringstd/core/types/string: V
fun whitespace0(): parsestd/text/parse/parse: (E, V) -> V stringstd/core/types/string: V
private import std/core/typesstd/core/types, std/core/hndstd/core/hnd, std/core/exnstd/core/exn, std/core/boolstd/core/bool, std/core/orderstd/core/order, std/core/charstd/core/char, std/core/intstd/core/int, std/core/vectorstd/core/vector, std/core/stringstd/core/string, std/core/sslicestd/core/sslice, std/core/liststd/core/list, std/core/maybestd/core/maybe, std/core/eitherstd/core/either, std/core/tuplestd/core/tuple, std/core/showstd/core/show, std/core/debugstd/core/debug, std/core/delayedstd/core/delayed, std/core/consolestd/core/console, std/corestd/core, std/core/undivstd/core/undiv