Documentation
¶
Overview ¶
Package special provides Ale's special forms and compiler primitives that emit instructions during compilation. These include fundamental constructs like lambda and let, as well as namespace management.
Index ¶
- Constants
- Variables
- func Asm(e encoder.Encoder, args ...ale.Value) error
- func Declared(e encoder.Encoder, args ...ale.Value) error
- func Import(e encoder.Encoder, args ...ale.Value) error
- func Lambda(e encoder.Encoder, args ...ale.Value) error
- func Let(e encoder.Encoder, args ...ale.Value) error
- func LetMutual(e encoder.Encoder, args ...ale.Value) error
- func MakeNamespace(e encoder.Encoder, args ...ale.Value) error
- func Special(e encoder.Encoder, args ...ale.Value) error
Constants ¶
View Source
const ( // ErrUnpairedBindings is raised when a Let binding Vector has fewer or // more than two elements ErrUnpairedBindings = "binding must be a paired vector" // ErrUnexpectedLetSyntax is raised when the Let bindings are not in the // form of a List or Vector ErrUnexpectedLetSyntax = "unexpected binding syntax: %s" // ErrNameAlreadyBound is raised when there's an attempt to bind the same // name more than once in a single Let scope ErrNameAlreadyBound = "name is already bound in local scope: %s" )
View Source
const ( ErrExpectedName = "name expected, got %s" ErrUnexpectedImport = "unexpected import pattern: %s" ErrDuplicateName = "duplicate name(s) in import: %s" )
Variables ¶
View Source
var ( // Eval encodes an immediate evaluation Eval = makeEvaluator(eval.Value) // MacroExpand performs macro expansion of a form until it can no longer MacroExpand = makeEvaluator(macro.Expand) // MacroExpand1 performs a single-step macro expansion of a form MacroExpand1 = makeEvaluator(macro.Expand1) )
Functions ¶
func Let ¶
Let encodes a binding form. Binding values are evaluated first, and are then bound to fresh names, meaning that mutual recursion is not supported
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.