Documentation

Init.Meta

@[extern lean_get_githash]
constant Lean.getGithash (u : Unit) :
@[extern c inline "LEAN_VERSION_IS_RELEASE"]
@[extern c inline "lean_mk_string(LEAN_SPECIAL_VERSION_DESC)"]

Additional version description like "nightly-2018-03-11"

Equations
@[extern c inline "LEAN_IS_STAGE0"]
constant Lean.Internal.isStage0 (u : Unit) :
def Lean.isGreek (c : Char) :
Equations
Equations
Equations
Equations
Equations
Equations
@[inline]
Equations

Remove macros scopes, apply f, and put them back

Equations
Equations
structure Lean.NameGenerator :
Type
Equations
@[inline]
Equations
@[inline]
Equations
class Lean.MonadNameGenerator (m : TypeType) :
Type
Instances
def Lean.mkFreshId {m : TypeType} [inst : Monad m] [inst : Lean.MonadNameGenerator m] :
Equations
instance Lean.monadNameGeneratorLift (m : TypeType) (n : TypeType) [inst : MonadLift m n] [inst : Lean.MonadNameGenerator m] :
Equations
Equations
def Lean.Syntax.getSubstring? (stx : Lean.Syntax) (withLeading : optParam Bool true) (withTrailing : optParam Bool true) :
Equations

Return substring of original input covering stx. Result is meaningful only if all involved SourceInfo.originals refer to the same string (as is the case after parsing).

Equations
Equations
Equations

Return the first atom/identifier that has position information

Equations

Ensure head position is synthetic. The server regards syntax as "original" only if both head and tail info are original.

@[inline]
def Lean.withHeadRefOnly {m : TypeType} [inst : Monad m] [inst : Lean.MonadRef m] {α : Type} (x : m α) :
m α
Equations

Use the head atom/identifier of the current ref as the ref

structure Lean.Module :
Type

Expand all macros in the given syntax

Equations

Create an identifier copying the position from src. To refer to a specific constant, use mkCIdentFrom instead.

def Lean.mkIdentFromRef {m : TypeType} [inst : Monad m] [inst : Lean.MonadRef m] (val : Lean.Name) :
Equations
Equations

Create an identifier referring to a constant c copying the position from src. This variant of mkIdentFrom makes sure that the identifier cannot accidentally be captured.

def Lean.mkCIdentFromRef {m : TypeType} [inst : Monad m] [inst : Lean.MonadRef m] (c : Lean.Name) :
Equations
Equations
Equations
Equations
def Lean.Syntax.SepArray.ofElemsUsingRef {m : TypeType} [inst : Monad m] [inst : Lean.MonadRef m] {sep : String} (elems : Array Lean.Syntax) :
Equations
Equations
Equations

Create syntax representing a Lean term application, but avoid degenerate empty applications.

Equations
Equations
Equations
partial def Lean.Syntax.decodeScientificLitVal?.decodeAfterExp (s : String) (i : String.Pos) (val : Nat) (e : Nat) (sign : Bool) (exp : Nat) :
Equations
Equations
Equations
Equations
Equations

Split a name literal (without the backtick) into its dot-separated components. For example, foo.bla.«bo.o»["foo","bla","«bo.o»"]. If the literal cannot be parsed, return [].

Equations
Equations
Equations
Equations
Equations
Equations
Equations
Equations
Equations
Equations
Equations
instance Lean.instQuoteProd {α : Type} {β : Type} [inst : Lean.Quote α] [inst : Lean.Quote β] :
Lean.Quote (α × β)
Equations
instance Lean.instQuoteList {α : Type} [inst : Lean.Quote α] :
Equations
  • Lean.instQuoteList = { quote := Lean.quoteList }
instance Lean.instQuoteArray {α : Type} [inst : Lean.Quote α] :
Equations
instance Lean.Option.hasQuote {α : Type} [inst : Lean.Quote α] :
Equations
  • Lean.Option.hasQuote = { quote := Lean.quoteOption }
Equations
Equations
Equations
@[inline]
abbrev Array.getSepElems {α : Type u_1} (as : Array α) :
Equations
def Array.filterSepElemsM {m : TypeType} [inst : Monad m] (a : Array Lean.Syntax) (p : Lean.Syntaxm Bool) :
Equations
def Array.mapSepElemsM {m : TypeType} [inst : Monad m] (a : Array Lean.Syntax) (f : Lean.Syntaxm Lean.Syntax) :
Equations
@[inline]
abbrev autoParam (α : Sort u) (tactic : Lean.Syntax) :
Sort u
Equations

Gadget for automatic parameter support. This is similar to the optParam gadget, but it uses the given tactic. Like optParam, this gadget only affects elaboration. For example, the tactic will not be invoked during type class resolution.

Equations
Equations
structure Lean.Meta.DSimp.Config :
Type
Equations
  • Lean.Meta.DSimp.instInhabitedConfig = { default := { zeta := default, beta := default, eta := default, etaStruct := default, iota := default, proj := default, decide := default, autoUnfold := default } }
structure Lean.Meta.Simp.Config :
Type
Equations
  • Lean.Meta.Simp.instInhabitedConfig = { default := { maxSteps := default, maxDischargeDepth := default, contextual := default, memoize := default, singlePass := default, zeta := default, beta := default, eta := default, etaStruct := default, iota := default, proj := default, decide := default, arith := default, autoUnfold := default } }
Equations
structure Lean.Meta.Rewrite.Config :
Type