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

CopyrightJustin Ethier
LicenseMIT (see LICENSE in the distribution)
Maintainergithub.com/justinethier
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell98

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

explicitRenamingTransform Source #

Arguments

:: Env

Environment where macro was used

-> Env

Temporary environment to store renamed variables

-> Env

Environment containing any variables renamed by syntax-rules

-> LispVal

Form to transform

-> LispVal

Macro transformer

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

Eval func

-> IOThrowsError LispVal 

Handle an explicit renaming macro