~/bend-docscommunity

src/lib/dec.bend checks

raw source on the hub · import 0x8cced805dd17b3296cb7aabd2fa292bb/src/lib/dec.bend as Dec

2 imports
import Base
import ./u64.bend as U

Types

type Dec source · line 9 · raw

@-A:Type -> Type

Definitions

def Dec.pure source · line 12 · raw

@-A:Type -> @x:A -> Dec<A>

def Dec.fail source · line 15 · raw

@-A:Type -> Dec<A>

def Dec.run source · line 18 · raw

@-A:Type -> @d:Dec<A> -> @ws:List<&2, U32> -> Maybe<&1, Pair(A, List<&2, U32>)>

def Dec.bind.got source · line 23 · raw

@-A:Type -> @-B:Type -> @r:Maybe<&1, Pair(A, List<&2, U32>)> -> @f:(@_:A -> Dec<B>) -> Maybe<&1, Pair(B, List<&2, U32>)>

def Dec.bind source · line 30 · raw

@-A:Type -> @-B:Type -> @m:Dec<A> -> @f:(@_:A -> Dec<B>) -> Dec<B>

def Dec.u32.go source · line 33 · raw

@ws:List<&2, U32> -> Maybe<&1, Pair(U32, List<&2, U32>)>

def Dec.u32 source · line 40 · raw

Dec<U32>

def Dec.u64 source · line 43 · raw

Dec<0x8cced805dd17b3296cb7aabd2fa292bb/src/lib/u64.U64>

def Dec.bool.of source · line 49 · raw

@w:U32 -> Dec<Bool>

def Dec.bool source · line 52 · raw

Dec<Bool>

def Dec.words source · line 58 · raw

@n:Nat -> Dec<List<&2, U32>>

n words.

def Dec.bytes source · line 69 · raw

Dec<List<&2, U32>>

A length-prefixed list of words (bytes, in practice).

def Dec.chars source · line 74 · raw

@n:Nat -> Dec<String>

def Dec.string source · line 85 · raw

Dec<String>

A length-prefixed string of character codes.

def Enc.u64 source · line 91 · raw

@a:0x8cced805dd17b3296cb7aabd2fa292bb/src/lib/u64.U64 -> List<&2, U32>

Encoders, the inverses: words in the same order.

def Enc.bool source · line 96 · raw

@b:Bool -> List<&2, U32>

def Enc.bytes source · line 99 · raw

@+bs:List<&2, U32> -> List<&2, U32>

def Enc.chars source · line 102 · raw

@s:String -> List<&2, U32>

def Enc.string source · line 109 · raw

@+s:String -> List<&2, U32>