Documentation

Lean.Hygiene

Remark: MonadQuotation class is part of the Init package and loaded by default since it is used in the builtin command macro.

@[inline, reducible]
abbrev Lean.Unhygienic (α : Type) :

Simplistic MonadQuotation that does not guarantee globally fresh names, that is, between different runs of this or other MonadQuotation implementations. It is only safe if the syntax quotations do not introduce bindings around antiquotations, and if references to globals are prefixed with _root_. (which is not allowed to refer to a local variable) Unhygienic can also be seen as a model implementation of MonadQuotation (since it is completely hygienic as long as it is "run" only once and can assume that there are no other implementations in use, as is the case for the elaboration monads that carry their macro scope state through the entire processing of a file). It uses the state monad to query and allocate the next macro scope, and uses the reader monad to store the stack of scopes corresponding to withFreshMacroScope calls.

Equations
Instances For
    Equations
    • One or more equations did not get rendered due to their size.
    Instances For

      Erase macro scopes from userName and add "tombstone" + superscript (or ._hyg).

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        Equations
        Instances For