Skip to main content

Module types

Module types 

Source
Expand description

Stub types for Phase 4/7 that are referenced by the Value enum.

Structs§

Agent
A Clojure agent — asynchronous state update queue (stub: not yet implemented).
Atom
A Clojure atom — a thread-safe mutable reference.
BoundFn
A function wrapped with captured dynamic bindings. When called, the captured bindings are pushed as a frame before delegating to the wrapped function. This means captured bindings override the caller’s for the same var, but vars not in the capture fall through normally.
CljxCons
A lazy cons cell: head element + tail (may be a LazySeq, List, or Nil).
CljxFn
An interpreted Clojure closure with captured environment.
CljxFnArity
One arity branch of a Clojure function.
CljxFuture
A future value computed asynchronously on another thread.
CljxPromise
A one-shot rendezvous (promise).
Delay
A lazy one-time computation (forced at most once, result cached).
LazySeq
A lazy sequence that forces its thunk exactly once and caches the result.
MultiFn
A Clojure multimethod — arbitrary dispatch via a user-supplied function.
Namespace
A Clojure namespace with intern table, refers, and aliases.
NativeFn
Protocol
A Clojure protocol — an interface-like construct with named methods.
ProtocolFn
Callable that dispatches a single protocol method on the type of args[0].
ProtocolMethod
One method signature declared in a defprotocol.
ReferClojureFilter
Which clojure.core names a namespace auto-refers, as narrowed by an (:refer-clojure ...) clause in ns. An absent filter (the default) refers every public core name.
Var
A Clojure var — a namespace-interned mutable root binding.
Volatile
Non-atomic mutable cell (single-thread performance, no CAS).

Enums§

Arity
DelayState
Internal state of a delay cell.
FutureState
Thread-pool future state.
LazySeqState
Internal state of a lazy sequence cell.

Constants§

FUTURE_CANCELLED_MSG
The message carried by the error raised when reading a cancelled future.

Traits§

Thunk
A deferred computation that produces a Value when forced.

Functions§

bump_protocol_generation
Invalidate all protocol-dispatch inline caches. Must be called after every mutation of any Protocol::impls map.
protocol_generation
Current protocol-extension generation (see bump_protocol_generation).

Type Aliases§

MethodMap
Inner map type for protocol implementations: method_name → impl fn.
NativeFnFunc
The callable stored inside a NativeFn. Supports both bare function pointers and closures that capture state.
NativeFnPtr
A Rust function callable from Clojure. Legacy type alias kept for source compatibility. Bare fn pointers implement Fn and can be passed anywhere a NativeFnFunc is expected.