husk-scheme-3.14: R5RS Scheme interpreter, compiler, and library.

Portabilityportable
Stabilityexperimental
Maintainergithub.com/justinethier
Safe HaskellNone

Language.Scheme.Macro.ExplicitRenaming

Description

This module contains code for explicit renaming (ER) macros, and is used by the Macro module to provide support for ER macros, both when called directly or when ER macros are found during macro expansion. This ensures both the er-macro-transformer and syntax-rules systems are compatible with each other.

Explicit renaming macros are based on the low-level facility from Will Clinger's paper Hygienic Macros Through Explicit Renaming, which was developed to complement the high level specification language (syntax-rules) from Macros that Work.

Synopsis

Documentation

explicitRenamingTransformSource

Arguments

:: Env

Environment where macro was used

-> Env

Temporary environment to store renamed variables

-> LispVal

Form to transform

-> LispVal

Macro transformer

-> (LispVal -> LispVal -> [LispVal] -> IOThrowsError LispVal)

Eval func

-> IOThrowsError LispVal 

Handle an explicit renaming macro