Builtin Modules
This page mirrors the builtin contract in the soundscript repo, especially
docs/reference/builtin-modules.md
and docs/v1-user-contract.md.
This page is the first-stop reference for the builtin surface most teams use in practice.
Ambient .sts Names
Checked .sts files get the core prelude names injected automatically, so you can use the common
sound-path helpers without repeating imports in every file.
The ambient names are:
- carriers and constructors:
Result,Option,Ok,Err,Some,None,ok,err,some,none - control-flow helpers:
Try,Match,where,Defer - carrier guards:
isOk,isErr,isSome,isNone - failure helpers and terminal helpers:
Failure,todo,unreachable
sts:prelude
sts:prelude is the explicit import form of the same core surface.
Use it when you want the prelude names in a file that prefers imports, or when you want an import statement to make the ownership boundary obvious.
It re-exports the same core values and types.
Stable Leaf Modules
The stable sts:* surface stays focused and composable.
sts:resultowns the canonicalResult/Optioncarriers and result-first helpers such asmapErr,tapErr,unwrapOr,unwrapOrElse,unwrapOrThrow, andcollect.sts:matchownsMatchandwhere.sts:failuresownsFailure,ErrorFrame, andnormalizeThrown(...).sts:jsonowns JSON boundary helpers for parsing, stringifying, and plain JSON validation, plus small record helpers such asisJsonObject,emptyJsonRecord,copyJsonRecord, andmergeJsonRecords.sts:decodeowns decoder contracts and structural decode helpers such asliteral,nullable,defaulted, andreadonlyRecord.sts:encodeowns encoder contracts and basic encode combinators.sts:codecowns codec contracts and adapter helpers.sts:asyncownsTask<T, E>and result-first async helpers.sts:compareownsEq,Order, and comparator composition helpers.sts:hashowns hashing and equality-key protocols.sts:deriveowns compiler-provided declaration macros such aseq,hash,decode,encode,codec, andtagged.sts:hktowns low-level higher-kinded type machinery.sts:typeclassesownsFunctor,Applicative,Monad,AsyncMonad, andDo.sts:url,sts:fetch,sts:text, andsts:randomare the initial portable leaf modules.
Experimental Modules
The repository also includes implemented builtin modules that stay outside the stable v1 contract.
sts:numericssts:valuests:thunksts:sqlsts:csssts:graphqlsts:debugsts:experimental/*