Copyright | Justin Ethier |
---|---|
License | MIT (see LICENSE in the distribution) |
Maintainer | github.com/justinethier |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
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
- explicitRenamingTransform :: Env -> Env -> Env -> LispVal -> LispVal -> (LispVal -> LispVal -> [LispVal] -> IOThrowsError LispVal) -> IOThrowsError LispVal
Documentation
explicitRenamingTransform Source #
:: 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