introspection

package
v1.13.21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 13, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package introspection provides read-only environment introspection primitives.

Index

Constants

This section is empty.

Variables

View Source
var AddToRegistry = Builder.AddToRegistry

AddToRegistry registers all introspection primitives.

View Source
var Builder = registry.NewRegistryBuilder(addPrimitives)

Builder aggregates all introspection registration functions.

View Source
var Extension = registry.NewDescribedExtension("introspection",
	"Runtime introspection: procedure metadata, disassembly, environment inspection.",
	AddToRegistry)

Extension is the introspection extension.

View Source
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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL