Return to Roc packages
Documentation
Str
Utf8ByteProblem
Utf8Problem
isEmpty
concat
withCapacity
reserve
joinWith
splitOn
repeat
toUtf8
fromUtf8
startsWith
endsWith
trim
trimStart
trimEnd
toDec
toF64
toF32
toU128
toI128
toU64
toI64
toU32
toI32
toU16
toI16
toU8
toI8
countUtf8Bytes
replaceEach
replaceFirst
replaceLast
splitFirst
splitLast
walkUtf8WithIndex
walkUtf8
releaseExcessCapacity
withPrefix
contains
dropPrefix
dropSuffix
Num
Num
Int
Frac
Signed128
Signed64
Signed32
Signed16
Signed8
Unsigned128
Unsigned64
Unsigned32
Unsigned16
Unsigned8
Integer
I128
I64
I32
I16
I8
U128
U64
U32
U16
U8
Decimal
Binary64
Binary32
FloatingPoint
F64
F32
Dec
e
pi
tau
toStr
intCast
compare
isLt
isGt
isLte
isGte
isApproxEq
isZero
isEven
isOdd
isPositive
isNegative
toFrac
isNaN
isInfinite
isFinite
abs
absDiff
neg
add
sub
mul
min
max
sin
cos
tan
asin
acos
atan
sqrt
sqrtChecked
log
logChecked
div
divChecked
divCeil
divCeilChecked
divTrunc
divTruncChecked
rem
remChecked
isMultipleOf
bitwiseAnd
bitwiseXor
bitwiseOr
bitwiseNot
shiftLeftBy
shiftRightBy
shiftRightZfBy
round
floor
ceiling
pow
powInt
countLeadingZeroBits
countTrailingZeroBits
countOneBits
addWrap
addSaturated
addChecked
subWrap
subSaturated
subChecked
mulWrap
mulSaturated
mulChecked
minI8
maxI8
minU8
maxU8
minI16
maxI16
minU16
maxU16
minI32
maxI32
minU32
maxU32
minI64
maxI64
minU64
maxU64
minI128
maxI128
minU128
maxU128
minF32
maxF32
minF64
maxF64
toI8
toI16
toI32
toI64
toI128
toU8
toU16
toU32
toU64
toU128
toF32
toF64
toI8Checked
toI16Checked
toI32Checked
toI64Checked
toI128Checked
toU8Checked
toU16Checked
toU32Checked
toU64Checked
toU128Checked
toF32Checked
toF64Checked
withoutDecimalPoint
withDecimalPoint
f32ToParts
f64ToParts
f32FromParts
f64FromParts
nanF32
nanF64
infinityF32
infinityF64
Bool
Eq
Bool
true
false
and
or
not
isNotEq
Result
Result
isOk
isErr
withDefault
map
mapErr
mapBoth
map2
try
onErr
onErr!
List
isEmpty
get
replace
set
update
append
appendIfOk
prepend
prependIfOk
len
withCapacity
reserve
releaseExcessCapacity
concat
last
single
repeat
reverse
join
contains
walk
walkWithIndex
walkWithIndexUntil
walkBackwards
walkUntil
walkBackwardsUntil
walkFrom
walkFromUntil
sum
product
any
all
keepIf
dropIf
countIf
keepOks
keepErrs
map
map2
map3
map4
mapWithIndex
range
sortWith
sortAsc
sortDesc
swap
first
takeFirst
takeLast
dropFirst
dropLast
dropAt
min
max
joinMap
findFirst
findLast
findFirstIndex
findLastIndex
sublist
intersperse
startsWith
endsWith
splitAt
splitOn
splitOnList
splitFirst
splitLast
chunksOf
mapTry
walkTry
concatUtf8
forEach!
forEachTry!
Dict
Dict
empty
withCapacity
reserve
releaseExcessCapacity
capacity
single
fromList
len
isEmpty
clear
map
joinMap
walk
walkUntil
keepIf
dropIf
get
contains
insert
remove
update
toList
keys
values
insertAll
keepShared
removeAll
Set
Set
empty
withCapacity
reserve
releaseExcessCapacity
single
insert
len
capacity
isEmpty
remove
contains
toList
fromList
union
intersection
difference
walk
map
joinMap
walkUntil
keepIf
dropIf
Decode
DecodeError
DecodeResult
Decoder
Decoding
DecoderFormatting
custom
decodeWith
fromBytesPartial
fromBytes
mapResult
Encode
Encoder
Encoding
EncoderFormatting
custom
appendWith
append
toBytes
Hash
Hash
Hasher
hashStrBytes
hashList
hashBool
hashI8
hashI16
hashI32
hashI64
hashI128
hashDec
hashUnordered
Box
box
unbox
Inspect
KeyValWalker
ElemWalker
InspectFormatter
Inspector
custom
apply
Inspect
inspect
toStr
Task
Task
forever
loop
ok
err
attempt
await
onErr
map
mapErr
fromResult
batch
sequence
forEach
result
Tip:
Some names
differ from other languages.
(press
s
)
Str
.
Utf8ByteProblem
: [ InvalidStartByte, UnexpectedEndOfSequence, ExpectedContinuation, OverlongEncoding, CodepointTooLarge, EncodesSurrogateHalf ]
Str
.
Utf8Problem
Str
.
isEmpty
: Str -> Bool
Str
.
concat
: Str, Str -> Str
Str
.
withCapacity
: U64 -> Str
Str
.
reserve
: Str, U64 -> Str
Str
.
joinWith
: List Str, Str -> Str
Str
.
splitOn
: Str, Str -> List Str
Str
.
repeat
: Str, U64 -> Str
Str
.
toUtf8
: Str -> List U8
Str
.
fromUtf8
: List U8 -> Result Str [BadUtf8 Utf8ByteProblem U64]
Str
.
startsWith
: Str, Str -> Bool
Str
.
endsWith
: Str, Str -> Bool
Str
.
trim
: Str -> Str
Str
.
trimStart
: Str -> Str
Str
.
trimEnd
: Str -> Str
Str
.
toDec
: Str -> Result Dec [InvalidNumStr]
Str
.
toF64
: Str -> Result F64 [InvalidNumStr]
Str
.
toF32
: Str -> Result F32 [InvalidNumStr]
Str
.
toU128
: Str -> Result U128 [InvalidNumStr]
Str
.
toI128
: Str -> Result I128 [InvalidNumStr]
Str
.
toU64
: Str -> Result U64 [InvalidNumStr]
Str
.
toI64
: Str -> Result I64 [InvalidNumStr]
Str
.
toU32
: Str -> Result U32 [InvalidNumStr]
Str
.
toI32
: Str -> Result I32 [InvalidNumStr]
Str
.
toU16
: Str -> Result U16 [InvalidNumStr]
Str
.
toI16
: Str -> Result I16 [InvalidNumStr]
Str
.
toU8
: Str -> Result U8 [InvalidNumStr]
Str
.
toI8
: Str -> Result I8 [InvalidNumStr]
Str
.
countUtf8Bytes
: Str -> U64
Str
.
replaceEach
: Str, Str, Str -> Str
Str
.
replaceFirst
: Str, Str, Str -> Str
Str
.
replaceLast
: Str, Str, Str -> Str
Str
.
splitFirst
: Str, Str -> Result { before : Str, after : Str } [NotFound]
Str
.
splitLast
: Str, Str -> Result { before : Str, after : Str } [NotFound]
Str
.
walkUtf8WithIndex
: Str, state, (state, U8, U64 -> state) -> state
Str
.
walkUtf8
: Str, state, (state, U8 -> state) -> state
Str
.
releaseExcessCapacity
: Str -> Str
Str
.
withPrefix
: Str, Str -> Str
Str
.
contains
: Str, Str -> Bool
Str
.
dropPrefix
: Str, Str -> Str
Str
.
dropSuffix
: Str, Str -> Str
Num
.
Num
Num
.
Int
Num
.
Frac
Num
.
Signed128
Num
.
Signed64
Num
.
Signed32
Num
.
Signed16
Num
.
Signed8
Num
.
Unsigned128
Num
.
Unsigned64
Num
.
Unsigned32
Num
.
Unsigned16
Num
.
Unsigned8
Num
.
Integer
Num
.
I128
Num
.
I64
Num
.
I32
Num
.
I16
Num
.
I8
Num
.
U128
Num
.
U64
Num
.
U32
Num
.
U16
Num
.
U8
Num
.
Decimal
Num
.
Binary64
Num
.
Binary32
Num
.
FloatingPoint
Num
.
F64
Num
.
F32
Num
.
Dec
Num
.
e
: Frac *
Num
.
pi
: Frac *
Num
.
tau
: Frac *
Num
.
toStr
: Num * -> Str
Num
.
intCast
: Int a -> Int b
Num
.
compare
: Num a, Num a -> [ LT, EQ, GT ]
Num
.
isLt
: Num a, Num a -> Bool
Num
.
isGt
: Num a, Num a -> Bool
Num
.
isLte
: Num a, Num a -> Bool
Num
.
isGte
: Num a, Num a -> Bool
Num
.
isApproxEq
: Frac a, Frac a, { rtol ? Frac a, atol ? Frac a } -> Bool
Num
.
isZero
: Num a -> Bool
Num
.
isEven
: Int a -> Bool
Num
.
isOdd
: Int a -> Bool
Num
.
isPositive
: Num a -> Bool
Num
.
isNegative
: Num a -> Bool
Num
.
toFrac
: Num * -> Frac *
Num
.
isNaN
: Frac * -> Bool
Num
.
isInfinite
: Frac * -> Bool
Num
.
isFinite
: Frac * -> Bool
Num
.
abs
: Num a -> Num a
Num
.
absDiff
: Num a, Num a -> Num a
Num
.
neg
: Num a -> Num a
Num
.
add
: Num a, Num a -> Num a
Num
.
sub
: Num a, Num a -> Num a
Num
.
mul
: Num a, Num a -> Num a
Num
.
min
: Num a, Num a -> Num a
Num
.
max
: Num a, Num a -> Num a
Num
.
sin
: Frac a -> Frac a
Num
.
cos
: Frac a -> Frac a
Num
.
tan
: Frac a -> Frac a
Num
.
asin
: Frac a -> Frac a
Num
.
acos
: Frac a -> Frac a
Num
.
atan
: Frac a -> Frac a
Num
.
sqrt
: Frac a -> Frac a
Num
.
sqrtChecked
: Frac a -> Result (Frac a) [SqrtOfNegative]
Num
.
log
: Frac a -> Frac a
Num
.
logChecked
: Frac a -> Result (Frac a) [LogNeedsPositive]
Num
.
div
: Frac a, Frac a -> Frac a
Num
.
divChecked
: Frac a, Frac a -> Result (Frac a) [DivByZero]
Num
.
divCeil
: Int a, Int a -> Int a
Num
.
divCeilChecked
: Int a, Int a -> Result (Int a) [DivByZero]
Num
.
divTrunc
: Int a, Int a -> Int a
Num
.
divTruncChecked
: Int a, Int a -> Result (Int a) [DivByZero]
Num
.
rem
: Int a, Int a -> Int a
Num
.
remChecked
: Int a, Int a -> Result (Int a) [DivByZero]
Num
.
isMultipleOf
: Int a, Int a -> Bool
Num
.
bitwiseAnd
: Int a, Int a -> Int a
Num
.
bitwiseXor
: Int a, Int a -> Int a
Num
.
bitwiseOr
: Int a, Int a -> Int a
Num
.
bitwiseNot
: Int a -> Int a
Num
.
shiftLeftBy
: Int a, U8 -> Int a
Num
.
shiftRightBy
: Int a, U8 -> Int a
Num
.
shiftRightZfBy
: Int a, U8 -> Int a
Num
.
round
: Frac * -> Int *
Num
.
floor
: Frac * -> Int *
Num
.
ceiling
: Frac * -> Int *
Num
.
pow
: Frac a, Frac a -> Frac a
Num
.
powInt
: Int a, Int a -> Int a
Num
.
countLeadingZeroBits
: Int a -> U8
Num
.
countTrailingZeroBits
: Int a -> U8
Num
.
countOneBits
: Int a -> U8
Num
.
addWrap
: Int range, Int range -> Int range
Num
.
addSaturated
: Num a, Num a -> Num a
Num
.
addChecked
: Num a, Num a -> Result (Num a) [Overflow]
Num
.
subWrap
: Int range, Int range -> Int range
Num
.
subSaturated
: Num a, Num a -> Num a
Num
.
subChecked
: Num a, Num a -> Result (Num a) [Overflow]
Num
.
mulWrap
: Int range, Int range -> Int range
Num
.
mulSaturated
: Num a, Num a -> Num a
Num
.
mulChecked
: Num a, Num a -> Result (Num a) [Overflow]
Num
.
minI8
: I8
Num
.
maxI8
: I8
Num
.
minU8
: U8
Num
.
maxU8
: U8
Num
.
minI16
: I16
Num
.
maxI16
: I16
Num
.
minU16
: U16
Num
.
maxU16
: U16
Num
.
minI32
: I32
Num
.
maxI32
: I32
Num
.
minU32
: U32
Num
.
maxU32
: U32
Num
.
minI64
: I64
Num
.
maxI64
: I64
Num
.
minU64
: U64
Num
.
maxU64
: U64
Num
.
minI128
: I128
Num
.
maxI128
: I128
Num
.
minU128
: U128
Num
.
maxU128
: U128
Num
.
minF32
: F32
Num
.
maxF32
: F32
Num
.
minF64
: F64
Num
.
maxF64
: F64
Num
.
toI8
: Int * -> I8
Num
.
toI16
: Int * -> I16
Num
.
toI32
: Int * -> I32
Num
.
toI64
: Int * -> I64
Num
.
toI128
: Int * -> I128
Num
.
toU8
: Int * -> U8
Num
.
toU16
: Int * -> U16
Num
.
toU32
: Int * -> U32
Num
.
toU64
: Int * -> U64
Num
.
toU128
: Int * -> U128
Num
.
toF32
: Num * -> F32
Num
.
toF64
: Num * -> F64
Num
.
toI8Checked
: Int * -> Result I8 [OutOfBounds]
Num
.
toI16Checked
: Int * -> Result I16 [OutOfBounds]
Num
.
toI32Checked
: Int * -> Result I32 [OutOfBounds]
Num
.
toI64Checked
: Int * -> Result I64 [OutOfBounds]
Num
.
toI128Checked
: Int * -> Result I128 [OutOfBounds]
Num
.
toU8Checked
: Int * -> Result U8 [OutOfBounds]
Num
.
toU16Checked
: Int * -> Result U16 [OutOfBounds]
Num
.
toU32Checked
: Int * -> Result U32 [OutOfBounds]
Num
.
toU64Checked
: Int * -> Result U64 [OutOfBounds]
Num
.
toU128Checked
: Int * -> Result U128 [OutOfBounds]
Num
.
toF32Checked
: Num * -> Result F32 [OutOfBounds]
Num
.
toF64Checked
: Num * -> Result F64 [OutOfBounds]
Num
.
withoutDecimalPoint
: Dec -> I128
Num
.
withDecimalPoint
: I128 -> Dec
Num
.
f32ToParts
: F32 -> { sign : Bool, exponent : U8, fraction : U32 }
Num
.
f64ToParts
: F64 -> { sign : Bool, exponent : U16, fraction : U64 }
Num
.
f32FromParts
: { sign : Bool, exponent : U8, fraction : U32 } -> F32
Num
.
f64FromParts
: { sign : Bool, exponent : U16, fraction : U64 } -> F64
Num
.
nanF32
: F32
Num
.
nanF64
: F64
Num
.
infinityF32
: F32
Num
.
infinityF64
: F64
Bool
.
Eq
: implements isEq : a, a -> Bool where a implements Eq
Bool
.
Bool
Bool
.
true
: Bool
Bool
.
false
: Bool
Bool
.
and
: Bool, Bool -> Bool
Bool
.
or
: Bool, Bool -> Bool
Bool
.
not
: Bool -> Bool
Bool
.
isNotEq
: a, a -> Bool where a implements Eq
Result
.
Result
: [ Ok ok, Err err ]
Result
.
isOk
: Result ok err -> Bool
Result
.
isErr
: Result ok err -> Bool
Result
.
withDefault
: Result ok err, ok -> ok
Result
.
map
: Result a err, (a -> b) -> Result b err
Result
.
mapErr
: Result ok a, (a -> b) -> Result ok b
Result
.
mapBoth
: Result ok1 err1, (ok1 -> ok2), (err1 -> err2) -> Result ok2 err2
Result
.
map2
: Result a err, Result b err, (a, b -> c) -> Result c err
Result
.
try
: Result a err, (a -> Result b err) -> Result b err
Result
.
onErr
: Result a err, (err -> Result a otherErr) -> Result a otherErr
Result
.
onErr!
: Result a err, (err => Result a otherErr) => Result a otherErr
List
.
isEmpty
: List * -> Bool
List
.
get
: List a, U64 -> Result a [OutOfBounds]
List
.
replace
: List a, U64, a -> { list : List a, value : a }
List
.
set
: List a, U64, a -> List a
List
.
update
: List a, U64, (a -> a) -> List a
List
.
append
: List a, a -> List a
List
.
appendIfOk
: List a, Result a * -> List a
List
.
prepend
: List a, a -> List a
List
.
prependIfOk
: List a, Result a * -> List a
List
.
len
: List * -> U64
List
.
withCapacity
: U64 -> List *
List
.
reserve
: List a, U64 -> List a
List
.
releaseExcessCapacity
: List a -> List a
List
.
concat
: List a, List a -> List a
List
.
last
: List a -> Result a [ListWasEmpty]
List
.
single
: a -> List a
List
.
repeat
: a, U64 -> List a
List
.
reverse
: List a -> List a
List
.
join
: List (List a) -> List a
List
.
contains
: List a, a -> Bool where a implements Eq
List
.
walk
: List elem, state, (state, elem -> state) -> state
List
.
walkWithIndex
: List elem, state, (state, elem, U64 -> state) -> state
List
.
walkWithIndexUntil
: List elem, state, (state, elem, U64 -> [ Continue state, Break state ]) -> state
List
.
walkBackwards
: List elem, state, (state, elem -> state) -> state
List
.
walkUntil
: List elem, state, (state, elem -> [ Continue state, Break state ]) -> state
List
.
walkBackwardsUntil
: List elem, state, (state, elem -> [ Continue state, Break state ]) -> state
List
.
walkFrom
: List elem, U64, state, (state, elem -> state) -> state
List
.
walkFromUntil
: List elem, U64, state, (state, elem -> [ Continue state, Break state ]) -> state
List
.
sum
: List (Num a) -> Num a
List
.
product
: List (Num a) -> Num a
List
.
any
: List a, (a -> Bool) -> Bool
List
.
all
: List a, (a -> Bool) -> Bool
List
.
keepIf
: List a, (a -> Bool) -> List a
List
.
dropIf
: List a, (a -> Bool) -> List a
List
.
countIf
: List a, (a -> Bool) -> U64
List
.
keepOks
: List before, (before -> Result after *) -> List after
List
.
keepErrs
: List before, (before -> Result * after) -> List after
List
.
map
: List a, (a -> b) -> List b
List
.
map2
: List a, List b, (a, b -> c) -> List c
List
.
map3
: List a, List b, List c, (a, b, c -> d) -> List d
List
.
map4
: List a, List b, List c, List d, (a, b, c, d -> e) -> List e
List
.
mapWithIndex
: List a, (a, U64 -> b) -> List b
List
.
range
List
.
sortWith
: List a, (a, a -> [ LT, EQ, GT ]) -> List a
List
.
sortAsc
: List (Num a) -> List (Num a)
List
.
sortDesc
: List (Num a) -> List (Num a)
List
.
swap
: List a, U64, U64 -> List a
List
.
first
: List a -> Result a [ListWasEmpty]
List
.
takeFirst
: List elem, U64 -> List elem
List
.
takeLast
: List elem, U64 -> List elem
List
.
dropFirst
: List elem, U64 -> List elem
List
.
dropLast
: List elem, U64 -> List elem
List
.
dropAt
: List elem, U64 -> List elem
List
.
min
: List (Num a) -> Result (Num a) [ListWasEmpty]
List
.
max
: List (Num a) -> Result (Num a) [ListWasEmpty]
List
.
joinMap
: List a, (a -> List b) -> List b
List
.
findFirst
: List elem, (elem -> Bool) -> Result elem [NotFound]
List
.
findLast
: List elem, (elem -> Bool) -> Result elem [NotFound]
List
.
findFirstIndex
: List elem, (elem -> Bool) -> Result U64 [NotFound]
List
.
findLastIndex
: List elem, (elem -> Bool) -> Result U64 [NotFound]
List
.
sublist
: List elem, { start : U64, len : U64 } -> List elem
List
.
intersperse
: List elem, elem -> List elem
List
.
startsWith
: List elem, List elem -> Bool where elem implements Eq
List
.
endsWith
: List elem, List elem -> Bool where elem implements Eq
List
.
splitAt
: List elem, U64 -> { before : List elem, others : List elem }
List
.
splitOn
: List a, a -> List (List a) where a implements Eq
List
.
splitOnList
: List a, List a -> List (List a) where a implements Eq
List
.
splitFirst
: List elem, elem -> Result { before : List elem, after : List elem } [NotFound] where elem implements Eq
List
.
splitLast
: List elem, elem -> Result { before : List elem, after : List elem } [NotFound] where elem implements Eq
List
.
chunksOf
: List a, U64 -> List (List a)
List
.
mapTry
: List elem, (elem -> Result ok err) -> Result (List ok) err
List
.
walkTry
: List elem, state, (state, elem -> Result state err) -> Result state err
List
.
concatUtf8
: List U8, Str -> List U8
List
.
forEach!
: List a, (a => {}) => {}
List
.
forEachTry!
: List a, (a => Result {} err) => Result {} err
Dict
.
Dict
Dict
.
empty
: {} -> Dict * *
Dict
.
withCapacity
: U64 -> Dict * *
Dict
.
reserve
: Dict k v, U64 -> Dict k v
Dict
.
releaseExcessCapacity
: Dict k v -> Dict k v
Dict
.
capacity
: Dict * * -> U64
Dict
.
single
: k, v -> Dict k v
Dict
.
fromList
: List ( k, v ) -> Dict k v
Dict
.
len
: Dict * * -> U64
Dict
.
isEmpty
: Dict * * -> Bool
Dict
.
clear
: Dict k v -> Dict k v
Dict
.
map
: Dict k a, (k, a -> b) -> Dict k b
Dict
.
joinMap
: Dict a b, (a, b -> Dict x y) -> Dict x y
Dict
.
walk
: Dict k v, state, (state, k, v -> state) -> state
Dict
.
walkUntil
: Dict k v, state, (state, k, v -> [ Continue state, Break state ]) -> state
Dict
.
keepIf
: Dict k v, ( ( k, v ) -> Bool) -> Dict k v
Dict
.
dropIf
: Dict k v, ( ( k, v ) -> Bool) -> Dict k v
Dict
.
get
: Dict k v, k -> Result v [KeyNotFound]
Dict
.
contains
: Dict k v, k -> Bool
Dict
.
insert
: Dict k v, k, v -> Dict k v
Dict
.
remove
: Dict k v, k -> Dict k v
Dict
.
update
: Dict k v, k, (Result v [Missing] -> Result v [Missing]) -> Dict k v
Dict
.
toList
: Dict k v -> List ( k, v )
Dict
.
keys
: Dict k v -> List k
Dict
.
values
: Dict k v -> List v
Dict
.
insertAll
: Dict k v, Dict k v -> Dict k v
Dict
.
keepShared
: Dict k v, Dict k v -> Dict k v where v implements Eq
Dict
.
removeAll
: Dict k v, Dict k v -> Dict k v
Set
.
Set
Set
.
empty
: {} -> Set *
Set
.
withCapacity
: U64 -> Set *
Set
.
reserve
: Set k, U64 -> Set k
Set
.
releaseExcessCapacity
: Set k -> Set k
Set
.
single
: k -> Set k
Set
.
insert
: Set k, k -> Set k
Set
.
len
: Set * -> U64
Set
.
capacity
: Set * -> U64
Set
.
isEmpty
: Set * -> Bool
Set
.
remove
: Set k, k -> Set k
Set
.
contains
: Set k, k -> Bool
Set
.
toList
: Set k -> List k
Set
.
fromList
: List k -> Set k
Set
.
union
: Set k, Set k -> Set k
Set
.
intersection
: Set k, Set k -> Set k
Set
.
difference
: Set k, Set k -> Set k
Set
.
walk
: Set k, state, (state, k -> state) -> state
Set
.
map
: Set a, (a -> b) -> Set b
Set
.
joinMap
: Set a, (a -> Set b) -> Set b
Set
.
walkUntil
: Set k, state, (state, k -> [ Continue state, Break state ]) -> state
Set
.
keepIf
: Set k, (k -> Bool) -> Set k
Set
.
dropIf
: Set k, (k -> Bool) -> Set k
Decode
.
DecodeError
: [TooShort]
Decode
.
DecodeResult
Decode
.
Decoder
Decode
.
Decoding
: implements decoder : Decoder val fmt where val implements Decoding, fmt implements DecoderFormatting
Decode
.
DecoderFormatting
: implements u8 : Decoder U8 fmt where fmt implements DecoderFormatting u16 : Decoder U16 fmt where fmt implements DecoderFormatting u32 : Decoder U32 fmt where fmt implements DecoderFormatting u64 : Decoder U64 fmt where fmt implements DecoderFormatting u128 : Decoder U128 fmt where fmt implements DecoderFormatting i8 : Decoder I8 fmt where fmt implements DecoderFormatting i16 : Decoder I16 fmt where fmt implements DecoderFormatting i32 : Decoder I32 fmt where fmt implements DecoderFormatting i64 : Decoder I64 fmt where fmt implements DecoderFormatting i128 : Decoder I128 fmt where fmt implements DecoderFormatting f32 : Decoder F32 fmt where fmt implements DecoderFormatting f64 : Decoder F64 fmt where fmt implements DecoderFormatting dec : Decoder Dec fmt where fmt implements DecoderFormatting bool : Decoder Bool fmt where fmt implements DecoderFormatting string : Decoder Str fmt where fmt implements DecoderFormatting list : Decoder elem fmt -> Decoder (List elem) fmt where fmt implements DecoderFormatting record : state, (state, Str -> [ Keep (Decoder state fmt), Skip ]), (state, fmt -> Result val DecodeError) -> Decoder val fmt where fmt implements DecoderFormatting tuple : state, (state, U64 -> [ Next (Decoder state fmt), TooLong ]), (state -> Result val DecodeError) -> Decoder val fmt where fmt implements DecoderFormatting
Decode
.
custom
: (List U8, fmt -> DecodeResult val) -> Decoder val fmt where fmt implements DecoderFormatting
Decode
.
decodeWith
: List U8, Decoder val fmt, fmt -> DecodeResult val where fmt implements DecoderFormatting
Decode
.
fromBytesPartial
: List U8, fmt -> DecodeResult val where val implements Decoding, fmt implements DecoderFormatting
Decode
.
fromBytes
: List U8, fmt -> Result val [Leftover (List U8)]DecodeError where val implements Decoding, fmt implements DecoderFormatting
Decode
.
mapResult
: DecodeResult a, (a -> b) -> DecodeResult b
Encode
.
Encoder
Encode
.
Encoding
: implements toEncoder : val -> Encoder fmt where val implements Encoding, fmt implements EncoderFormatting
Encode
.
EncoderFormatting
: implements u8 : U8 -> Encoder fmt where fmt implements EncoderFormatting u16 : U16 -> Encoder fmt where fmt implements EncoderFormatting u32 : U32 -> Encoder fmt where fmt implements EncoderFormatting u64 : U64 -> Encoder fmt where fmt implements EncoderFormatting u128 : U128 -> Encoder fmt where fmt implements EncoderFormatting i8 : I8 -> Encoder fmt where fmt implements EncoderFormatting i16 : I16 -> Encoder fmt where fmt implements EncoderFormatting i32 : I32 -> Encoder fmt where fmt implements EncoderFormatting i64 : I64 -> Encoder fmt where fmt implements EncoderFormatting i128 : I128 -> Encoder fmt where fmt implements EncoderFormatting f32 : F32 -> Encoder fmt where fmt implements EncoderFormatting f64 : F64 -> Encoder fmt where fmt implements EncoderFormatting dec : Dec -> Encoder fmt where fmt implements EncoderFormatting bool : Bool -> Encoder fmt where fmt implements EncoderFormatting string : Str -> Encoder fmt where fmt implements EncoderFormatting list : List elem, (elem -> Encoder fmt) -> Encoder fmt where fmt implements EncoderFormatting record : List { key : Str, value : Encoder fmt } -> Encoder fmt where fmt implements EncoderFormatting tuple : List (Encoder fmt) -> Encoder fmt where fmt implements EncoderFormatting tag : Str, List (Encoder fmt) -> Encoder fmt where fmt implements EncoderFormatting
Encode
.
custom
: (List U8, fmt -> List U8) -> Encoder fmt where fmt implements EncoderFormatting
Encode
.
appendWith
: List U8, Encoder fmt, fmt -> List U8 where fmt implements EncoderFormatting
Encode
.
append
: List U8, val, fmt -> List U8 where val implements Encoding, fmt implements EncoderFormatting
Encode
.
toBytes
: val, fmt -> List U8 where val implements Encoding, fmt implements EncoderFormatting
Hash
.
Hash
: implements hash : hasher, a -> hasher where a implements Hash, hasher implements Hasher
Hash
.
Hasher
: implements addBytes : a, List U8 -> a where a implements Hasher addU8 : a, U8 -> a where a implements Hasher addU16 : a, U16 -> a where a implements Hasher addU32 : a, U32 -> a where a implements Hasher addU64 : a, U64 -> a where a implements Hasher addU128 : a, U128 -> a where a implements Hasher complete : a -> U64 where a implements Hasher
Hash
.
hashStrBytes
Hash
.
hashList
Hash
.
hashBool
: a, Bool -> a where a implements Hasher
Hash
.
hashI8
: a, I8 -> a where a implements Hasher
Hash
.
hashI16
: a, I16 -> a where a implements Hasher
Hash
.
hashI32
: a, I32 -> a where a implements Hasher
Hash
.
hashI64
: a, I64 -> a where a implements Hasher
Hash
.
hashI128
: a, I128 -> a where a implements Hasher
Hash
.
hashDec
: a, Dec -> a where a implements Hasher
Hash
.
hashUnordered
Box
.
box
: a -> Box a
Box
.
unbox
: Box a -> a
Inspect
.
KeyValWalker
: collection, state, (state, key, val -> state) -> state
Inspect
.
ElemWalker
: collection, state, (state, elem -> state) -> state
Inspect
.
InspectFormatter
: implements init : {} -> f where f implements InspectFormatter tag : Str, List (Inspector f) -> Inspector f where f implements InspectFormatter tuple : List (Inspector f) -> Inspector f where f implements InspectFormatter record : List { key : Str, value : Inspector f } -> Inspector f where f implements InspectFormatter bool : Bool -> Inspector f where f implements InspectFormatter str : Str -> Inspector f where f implements InspectFormatter list : list, ElemWalker state list elem, (elem -> Inspector f) -> Inspector f where f implements InspectFormatter set : set, ElemWalker state set elem, (elem -> Inspector f) -> Inspector f where f implements InspectFormatter dict : dict, KeyValWalker state dict key value, (key -> Inspector f), (value -> Inspector f) -> Inspector f where f implements InspectFormatter opaque : * -> Inspector f where f implements InspectFormatter function : * -> Inspector f where f implements InspectFormatter u8 : U8 -> Inspector f where f implements InspectFormatter i8 : I8 -> Inspector f where f implements InspectFormatter u16 : U16 -> Inspector f where f implements InspectFormatter i16 : I16 -> Inspector f where f implements InspectFormatter u32 : U32 -> Inspector f where f implements InspectFormatter i32 : I32 -> Inspector f where f implements InspectFormatter u64 : U64 -> Inspector f where f implements InspectFormatter i64 : I64 -> Inspector f where f implements InspectFormatter u128 : U128 -> Inspector f where f implements InspectFormatter i128 : I128 -> Inspector f where f implements InspectFormatter f32 : F32 -> Inspector f where f implements InspectFormatter f64 : F64 -> Inspector f where f implements InspectFormatter dec : Dec -> Inspector f where f implements InspectFormatter
Inspect
.
Inspector
Inspect
.
custom
: (f -> f) -> Inspector f where f implements InspectFormatter
Inspect
.
apply
: Inspector f, f -> f where f implements InspectFormatter
Inspect
.
Inspect
: implements toInspector : val -> Inspector f where val implements Inspect, f implements InspectFormatter
Inspect
.
inspect
: val -> f where val implements Inspect, f implements InspectFormatter
Inspect
.
toStr
: val -> Str where val implements Inspect
Task
.
Task
Task
.
forever
: Task a err -> Task * err
Task
.
loop
: state, (state -> Task [ Step state, Done done ] err) -> Task done err
Task
.
ok
: a -> Task a *
Task
.
err
: a -> Task * a
Task
.
attempt
: Task a b, (Result a b -> Task c d) -> Task c d
Task
.
await
: Task a b, (a -> Task c b) -> Task c b
Task
.
onErr
: Task a b, (b -> Task a c) -> Task a c
Task
.
map
: Task a c, (a -> b) -> Task b c
Task
.
mapErr
: Task c a, (a -> b) -> Task c b
Task
.
fromResult
: Result a b -> Task a b
Task
.
batch
: Task a c -> Task (a -> b) c -> Task b c
Task
.
sequence
: List (Task ok err) -> Task (List ok) err
Task
.
forEach
: List a, (a -> Task {} b) -> Task {} b
Task
.
result
: Task ok err -> Task (Result ok err) *
Exposed Modules
LLM docs
Str
Num
Bool
Result
List
Dict
Set
Decode
Encode
Hash
Box
Inspect
Task