# schooner v1.2.0 - Table of Contents An embeddable, sandboxed Scheme interpreter for the BEAM, targeting the r7rs-small language minus its mutable operations. ## Pages - [Schooner](readme.md) - [Changelog](changelog.md) - Guides - [Embedding Schooner](embedding.md) - [Host Functions](host-functions.md) - [Running Untrusted Scheme](sandbox.md) - [Deviations from r7rs-small](deviations.md) - [Tooling for Script Authors](tooling.md) ## Modules - [Schooner.Location](Schooner.Location.md): A position in Scheme source: the file it came from, if known, and the 1-based `line` and `column` of the first character of the form. - Embedding API - [Schooner](Schooner.md): An embeddable, sandboxed Scheme interpreter for the BEAM, targeting the r7rs-small language minus its mutable operations. - [Schooner.Compiled](Schooner.Compiled.md): Opaque artifact produced by `Schooner.compile/2` and consumed by `Schooner.run_compiled/3`. - [Schooner.Env](Schooner.Env.md): Environment for the Scheme evaluator: immutable lexical frames over a mutable globals table. - [Schooner.Environment](Schooner.Environment.md): Opaque embedding-friendly environment that bundles a runtime `Schooner.Env`, an expander `SyntaxEnv`, and a library registry. - [Schooner.Host](Schooner.Host.md): Helpers for authoring Elixir-side host functions exposed to Scheme. - [Schooner.Library](Schooner.Library.md): Registry entries for r7rs libraries. - [Schooner.Library.Loader](Schooner.Library.Loader.md): Compiles `(define-library ...)` declarations into `%Schooner.Library{}` registry entries. - [Schooner.Time](Schooner.Time.md): The r7rs `(scheme time)` library, supplied as a host library. - [Schooner.Value](Schooner.Value.md): Term representation of Scheme values. - Tooling - [Schooner.Debug](Schooner.Debug.md): The opt-in `(schooner debug)` library: tracing, printing and assertions for script authors. - [Schooner.Diagnostic](Schooner.Diagnostic.md): A problem `Schooner.check/3` found in a script without running it. - [Schooner.Frame](Schooner.Frame.md): One entry in the Scheme backtrace of an error raised with `debug: true`: a procedure application the script made. - [Schooner.Pretty](Schooner.Pretty.md): Pretty-printing for Scheme data and code, such as the forms returned by `Schooner.expand/3`. - [Schooner.Session](Schooner.Session.md): A sequence of evaluations against one `Schooner.Environment`, each seeing what the ones before it defined: the evaluation state behind `mix schooner.repl`, for building a console of your own. - Errors - [Schooner.Error](Schooner.Error.md): Host-side exception raised when a Scheme `raise` / `raise-continuable` / `error` is not caught by any installed `with-exception-handler` or `guard`. The struct carries the original Scheme value verbatim in `:value`; for an error object the host can pattern-match `{:error_obj, kind, message, irritants}` directly, or use `irritants/1` for the common case. - [Schooner.Eval.Error](Schooner.Eval.Error.md): Exception raised by the evaluator for runtime and syntactic failures. - [Schooner.Expander.Error](Schooner.Expander.Error.md): Exception raised by the expander for malformed macro forms, failed pattern matches, and other expansion-time failures. `:location` is the `Schooner.Location` of the form being expanded, or `nil`. - [Schooner.Host.TypeError](Schooner.Host.TypeError.md): Raised by `Schooner.Host` asserting accessors (`to_*!/2`) when a Scheme value does not match the shape the host expected. - [Schooner.Lexer.Error](Schooner.Lexer.Error.md): Exception raised by the lexer on malformed source. - [Schooner.Library.NotFoundError](Schooner.Library.NotFoundError.md): Raised when an `import` declaration (or `Schooner.Library.fetch!/2`) refers to a library that is not in the registry. `:location` is the `Schooner.Location` of the `import` form, when it is known. - [Schooner.Primitive.Error](Schooner.Primitive.Error.md): Exception raised by built-in primitives for domain-specific failures: type errors, division by zero, out-of-range indices and sizes, improper lists, results Schooner cannot represent, and a `Schooner.Debug` sink that fails. - [Schooner.Reader.Error](Schooner.Reader.Error.md): Exception raised by the reader on malformed source. ## Mix Tasks - Tooling - [mix schooner.check](Mix.Tasks.Schooner.Check.md): Checks Scheme scripts for problems without running them, with `Schooner.check/3`. - [mix schooner.expand](Mix.Tasks.Schooner.Expand.md): Prints what a Scheme script's macros expand to, with `Schooner.expand/3` and `Schooner.Pretty`, without running it. - [mix schooner.repl](Mix.Tasks.Schooner.Repl.md): Starts an interactive session against your application's real environment, built on `Schooner.Session`. Something that works here works in production, and something that's unbound in production is unbound here too.