stdlib
Use
(↥ "pkg:stdlib" pkg)
Call the exports below through the pkg alias, for example pkg.stdlib-ready.
Functions
stdlib-ready
Type: (∷ (→ Unit I64))
Return the stdlib smoke-test sentinel.
stdlib-option-some
Type: (∷ (→ Any Any))
Construct a standard Option Some value.
stdlib-option-none
Type: (∷ (→ Unit Any))
Construct a standard Option None value.
stdlib-option-some?
Type: (∷ (→ Any Bool))
Return true when an Option value is Some.
stdlib-result-ok
Type: (∷ (→ Any Any))
Construct a standard Result Ok value.
stdlib-result-err
Type: (∷ (→ Text Text Any))
Construct a standard Result Err value.
stdlib-result-ok?
Type: (∷ (→ Any Bool))
Return true when a Result value is Ok.
stdlib-list-empty
Type: (∷ (→ Unit Any))
Construct an empty standard list value.
stdlib-list-count
Type: (∷ (→ Any I64))
Return the number of items in a list.
stdlib-list-first-or
Type: (∷ (→ Any Any Any))
Return the first list item or a fallback.
stdlib-set-empty
Type: (∷ (→ Unit Any))
Construct an empty set value.
stdlib-set-add
Type: (∷ (→ Any Any Any))
Add a value to a set using stable list-backed storage.
stdlib-set-first?
Type: (∷ (→ Any Any Bool))
Return true when the first set item equals a text value.
stdlib-dict-empty
Type: (∷ (→ Unit Any))
Construct an empty dictionary value.
stdlib-dict-put
Type: (∷ (→ Any Text Any Any))
Put a key/value pair into a dictionary.
stdlib-dict-first-key?
Type: (∷ (→ Any Text Bool))
Return true when the first dictionary key matches.
stdlib-state-new
Type: (∷ (→ Text Any Any))
Construct a named state value.
stdlib-state-value
Type: (∷ (→ Any Any))
Return the payload from a state value.
stdlib-state-with
Type: (∷ (→ Any Any Any))
Return a state value with a replaced payload.
stdlib-matcher-exact
Type: (∷ (→ Text Any))
Construct an exact text matcher.
stdlib-matcher-matches?
Type: (∷ (→ Any Text Bool))
Return true when an exact matcher matches input text.
stdlib-effect-row
Type: (∷ (→ Text Any))
Construct a source-visible effect row descriptor.
stdlib-effect-capability
Type: (∷ (→ Any Text))
Return the capability name from an effect row descriptor.
stdlib-protocol-step
Type: (∷ (→ Text Text Text Any))
Construct a protocol/session step descriptor.
stdlib-protocol-role
Type: (∷ (→ Any Text))
Return the role from a protocol/session step descriptor.
stdlib-intent-command
Type: (∷ (→ Text Any Any))
Construct an intent command descriptor.
stdlib-intent-name
Type: (∷ (→ Any Text))
Return the name from an intent command descriptor.
stdlib-io-read-request
Type: (∷ (→ Text Any))
Construct an IO read request descriptor.
stdlib-io-write-request
Type: (∷ (→ Text Text Any))
Construct an IO write request descriptor.
stdlib-local-env-request
Type: (∷ (→ Text Any))
Construct a local environment lookup request descriptor.
stdlib-local-file-request
Type: (∷ (→ Text Any))
Construct a local file read request descriptor.
stdlib-net-request
Type: (∷ (→ Text Text Any))
Construct a network request descriptor.
stdlib-process-command
Type: (∷ (→ Text Any Any))
Construct a process command descriptor.
stdlib-random-bytes-request
Type: (∷ (→ I64 Any))
Construct a capability-checked random bytes request descriptor.
stdlib-time-now-request
Type: (∷ (→ Unit Any))
Construct a time lookup request descriptor.
stdlib-secret-get-request
Type: (∷ (→ Text Any))
Construct a scoped secret lookup request descriptor.
stdlib-ffi-symbol
Type: (∷ (→ Text Text Any))
Construct an FFI symbol descriptor.
stdlib-bit-flag
Type: (∷ (→ Bool I64))
Convert a boolean flag into a one-bit integer.
stdlib-bit-and01
Type: (∷ (→ I64 I64 I64))
Return the one-bit AND of two normalized 0/1 values.
stdlib-bit-or01
Type: (∷ (→ I64 I64 I64))
Return the one-bit OR of two normalized 0/1 values.
stdlib-float-scaled
Type: (∷ (→ I64 I64 Any))
Construct a deterministic scaled decimal value.
stdlib-float-add-same-scale
Type: (∷ (→ Any Any Any))
Add two scaled decimal values that share a scale.
stdlib-measure-value
Type: (∷ (→ I64 Text Any))
Construct a measured integer value.
stdlib-measure-unit
Type: (∷ (→ Any Text))
Return the unit from a measured value.
stdlib-probe-status
Type: (∷ (→ Text Bool Any))
Construct a probe status descriptor.
stdlib-probe-ok?
Type: (∷ (→ Any Bool))
Return true when a probe status is healthy.
stdlib-limiter-budget
Type: (∷ (→ Text I64 Any))
Construct a limiter budget descriptor.
stdlib-limiter-allow?
Type: (∷ (→ Any I64 Bool))
Return true when a usage count is inside the limiter budget.
stdlib-schedule-every
Type: (∷ (→ Text I64 Any))
Construct a recurring schedule descriptor.
stdlib-schedule-name
Type: (∷ (→ Any Text))
Return a schedule descriptor name.
stdlib-worker-job
Type: (∷ (→ Text Any Any))
Construct a worker job descriptor.
stdlib-worker-name
Type: (∷ (→ Any Text))
Return a worker job name.
stdlib-supervisor-policy
Type: (∷ (→ Text I64 Any))
Construct a supervisor restart policy descriptor.
stdlib-supervisor-strategy
Type: (∷ (→ Any Text))
Return a supervisor policy strategy.
stdlib-actor-ref
Type: (∷ (→ Text Any))
Construct a local actor reference descriptor.
stdlib-actor-send
Type: (∷ (→ Any Any Any))
Construct an actor send descriptor.
stdlib-actor-test-case
Type: (∷ (→ Text Any Any))
Construct a deterministic actor test-case descriptor.
stdlib-workspace-package
Type: (∷ (→ Text Text Any))
Construct a workspace package descriptor.
stdlib-workspace-name
Type: (∷ (→ Any Text))
Return a workspace package name.
stdlib-audit-event
Type: (∷ (→ Text Text Any))
Construct an audit event descriptor.
stdlib-audit-kind
Type: (∷ (→ Any Text))
Return an audit event kind.
stdlib-compliance-evidence
Type: (∷ (→ Text Text Any))
Construct a compliance evidence descriptor.
stdlib-compliance-control
Type: (∷ (→ Any Text))
Return a compliance evidence control id.