Documentation
¶
Overview ¶
Package introspection provides read-only environment introspection primitives.
Index ¶
- Variables
- func PrimAvailableLibraries(mc machine.CallContext) error
- func PrimDisassemble(mc machine.CallContext) error
- func PrimEnvironmentBoundNames(mc machine.CallContext) error
- func PrimEnvironmentBoundQ(mc machine.CallContext) error
- func PrimEnvironmentRef(mc machine.CallContext) error
- func PrimFeatures(mc machine.CallContext) error
- func PrimInteractionEnvironment(mc machine.CallContext) error
Constants ¶
This section is empty.
Variables ¶
var AddToRegistry = Builder.AddToRegistry
AddToRegistry registers all introspection primitives.
var Builder = registry.NewRegistryBuilder(addPrimitives)
Builder aggregates all introspection registration functions.
var Extension = registry.NewDescribedExtension("introspection", "Runtime introspection: procedure metadata, disassembly, environment inspection.", AddToRegistry)
Extension is the introspection extension.
var PrimEnvironmentQ = helpers.MakeTypePredicate(func(o values.Value) bool { _, ok := o.(*environment.Namespace) return ok })
PrimEnvironmentQ implements the (environment?) predicate. Returns #t if the argument is an environment, #f otherwise.
Functions ¶
func PrimAvailableLibraries ¶ added in v1.10.3
func PrimAvailableLibraries(mc machine.CallContext) error
PrimAvailableLibraries implements the (available-libraries) primitive. Returns a sorted list of all importable library names. Each library name is a list of symbols/integers matching R7RS syntax.
func PrimDisassemble ¶ added in v1.10.5
func PrimDisassemble(mc machine.CallContext) error
PrimDisassemble implements the (disassemble proc) primitive. Returns structured disassembly of a procedure as a list of alists.
func PrimEnvironmentBoundNames ¶
func PrimEnvironmentBoundNames(mc machine.CallContext) error
PrimEnvironmentBoundNames implements the (environment-bound-names) primitive. Returns a list of all symbols bound in the given environment. (environment-bound-names env) -> list
func PrimEnvironmentBoundQ ¶
func PrimEnvironmentBoundQ(mc machine.CallContext) error
PrimEnvironmentBoundQ implements the (environment-bound?) primitive. Returns #t if the symbol is bound in the given environment, #f otherwise. (environment-bound? env symbol) -> boolean
func PrimEnvironmentRef ¶
func PrimEnvironmentRef(mc machine.CallContext) error
PrimEnvironmentRef implements the (environment-ref) primitive. Returns the value bound to a symbol in the given environment. Signals an error if the symbol is unbound. (environment-ref env symbol) -> value
func PrimFeatures ¶ added in v1.9.9
func PrimFeatures(mc machine.CallContext) error
PrimFeatures implements the (features) primitive. Returns list of implementation features.
func PrimInteractionEnvironment ¶
func PrimInteractionEnvironment(mc machine.CallContext) error
PrimInteractionEnvironment implements the (interaction-environment) primitive. Returns the REPL environment (the current top-level environment).
Types ¶
This section is empty.