Module value

Module value 

Source
Expand description

Scheme value types

This module defines the Value enum, which represents all Scheme values. Corresponds to OpenJade’s ELObj class hierarchy.

§Design

Like OpenJade, we use garbage collection for heap-allocated values:

  • OpenJade: Custom mark-and-sweep collector (Collector class)
  • Dazzle: Rust gc crate (conservative GC)

§Value Types

Basic types (R4RS Scheme):

  • Nil: Empty list ()
  • Bool: #t and #f
  • Integer: Exact integers (i64)
  • Real: Inexact reals (f64)
  • Char: Unicode characters
  • String: Immutable strings
  • Symbol: Interned identifiers
  • Pair: Cons cells (car, cdr)
  • Vector: Arrays
  • Procedure: Functions (built-in or user-defined)

DSSSL types (code generation):

  • NodeList: Document tree node collections
  • Sosofo: Flow object sequences

DSSSL types (document formatting - stubs for now):

  • Quantity, Color, Address, etc.

Structs§

PairData
Pair data (car and cdr)
SourceInfo
Source code location information

Enums§

Procedure
Procedure (function)
Value
A Scheme value