File: .lake/packages/Qq/Qq/Macro.lean

full_name: Qq.Impl.ExprBackSubstResult.quoted
code: inductive ExprBackSubstResult
  | quoted (e : Expr)
  | unquoted (e : Expr)
goal: Qq.Impl.ExprBackSubstResult

full_name: Qq.Impl.ExprBackSubstResult.unquoted
code: inductive ExprBackSubstResult
  | quoted (e : Expr)
  | unquoted (e : Expr)
goal: Qq.Impl.ExprBackSubstResult

full_name: Qq.Impl.ExprBackSubstResult
code: inductive ExprBackSubstResult
  | quoted (e : Expr)
  | unquoted (e : Expr)
goal: Type

full_name: Qq.Impl.MVarSynth.type
code: inductive MVarSynth
  | term (quotedType : Expr) (unquotedMVar : MVarId) --> Quoted.unsafeMk _ _
  | type (unquotedMVar : MVarId) --> Quoted _
  | level (unquotedMVar : LMVarId)
goal: Qq.Impl.MVarSynth

full_name: Qq.Impl.MVarSynth.level
code: inductive MVarSynth
  | term (quotedType : Expr) (unquotedMVar : MVarId) --> Quoted.unsafeMk _ _
  | type (unquotedMVar : MVarId) --> Quoted _
  | level (unquotedMVar : LMVarId)
goal: Qq.Impl.MVarSynth

full_name: Qq.Impl.MVarSynth.term
code: inductive MVarSynth
  | term (quotedType : Expr) (unquotedMVar : MVarId) --> Quoted.unsafeMk _ _
  | type (unquotedMVar : MVarId) --> Quoted _
  | level (unquotedMVar : LMVarId)
goal: Qq.Impl.MVarSynth

full_name: Qq.Impl.MVarSynth
code: inductive MVarSynth
  | term (quotedType : Expr) (unquotedMVar : MVarId) --> Quoted.unsafeMk _ _
  | type (unquotedMVar : MVarId) --> Quoted _
  | level (unquotedMVar : LMVarId)
goal: Type

full_name: Qq.Impl.UnquoteState.mayPostpone
code: structure UnquoteState where
  /--
  Quoted mvars in the outside lctx (of type `Level`, `Quoted _`, or `Type`).
  The outside mvars can also be of the form `?m x y z`.
  -/
  mvars : List (Expr × MVarSynth) := []

  /-- Maps quoted expressions (of type Level) in the old context to level parameter names in the new context -/
  levelSubst : HashMap Expr Level := {}

  /-- Maps quoted expressions (of type Expr) in the old context to expressions in the new context -/
  exprSubst : HashMap Expr Expr := {}

  /-- New unquoted local context -/
  unquoted := LocalContext.empty

  /-- Maps free variables in the new context to expressions in the old context (of type Expr) -/
  exprBackSubst : HashMap Expr ExprBackSubstResult := {}

  /-- Maps free variables in the new context to levels in the old context (of type Level) -/
  levelBackSubst : HashMap Level Expr := {}

  /-- New free variables in the new context that were newly introduced for irreducible expressions. -/
  abstractedFVars : Array FVarId := #[]

  levelNames : List Name := []

  mayPostpone : Bool
goal: Bool

full_name: Qq.Impl.UnquoteState.levelBackSubst
code: structure UnquoteState where
  /--
  Quoted mvars in the outside lctx (of type `Level`, `Quoted _`, or `Type`).
  The outside mvars can also be of the form `?m x y z`.
  -/
  mvars : List (Expr × MVarSynth) := []

  /-- Maps quoted expressions (of type Level) in the old context to level parameter names in the new context -/
  levelSubst : HashMap Expr Level := {}

  /-- Maps quoted expressions (of type Expr) in the old context to expressions in the new context -/
  exprSubst : HashMap Expr Expr := {}

  /-- New unquoted local context -/
  unquoted := LocalContext.empty

  /-- Maps free variables in the new context to expressions in the old context (of type Expr) -/
  exprBackSubst : HashMap Expr ExprBackSubstResult := {}

  /-- Maps free variables in the new context to levels in the old context (of type Level) -/
  levelBackSubst : HashMap Level Expr := {}

  /-- New free variables in the new context that were newly introduced for irreducible expressions. -/
  abstractedFVars : Array FVarId := #[]

  levelNames : List Name := []

  mayPostpone : Bool
goal: Lean.HashMap Lean.Level Lean.Expr

full_name: Qq.Impl.UnquoteState.levelNames
code: structure UnquoteState where
  /--
  Quoted mvars in the outside lctx (of type `Level`, `Quoted _`, or `Type`).
  The outside mvars can also be of the form `?m x y z`.
  -/
  mvars : List (Expr × MVarSynth) := []

  /-- Maps quoted expressions (of type Level) in the old context to level parameter names in the new context -/
  levelSubst : HashMap Expr Level := {}

  /-- Maps quoted expressions (of type Expr) in the old context to expressions in the new context -/
  exprSubst : HashMap Expr Expr := {}

  /-- New unquoted local context -/
  unquoted := LocalContext.empty

  /-- Maps free variables in the new context to expressions in the old context (of type Expr) -/
  exprBackSubst : HashMap Expr ExprBackSubstResult := {}

  /-- Maps free variables in the new context to levels in the old context (of type Level) -/
  levelBackSubst : HashMap Level Expr := {}

  /-- New free variables in the new context that were newly introduced for irreducible expressions. -/
  abstractedFVars : Array FVarId := #[]

  levelNames : List Name := []

  mayPostpone : Bool
goal: List Lean.Name

full_name: Qq.Impl.UnquoteState.mvars
code: structure UnquoteState where
  /--
  Quoted mvars in the outside lctx (of type `Level`, `Quoted _`, or `Type`).
  The outside mvars can also be of the form `?m x y z`.
  -/
  mvars : List (Expr × MVarSynth) := []

  /-- Maps quoted expressions (of type Level) in the old context to level parameter names in the new context -/
  levelSubst : HashMap Expr Level := {}

  /-- Maps quoted expressions (of type Expr) in the old context to expressions in the new context -/
  exprSubst : HashMap Expr Expr := {}

  /-- New unquoted local context -/
  unquoted := LocalContext.empty

  /-- Maps free variables in the new context to expressions in the old context (of type Expr) -/
  exprBackSubst : HashMap Expr ExprBackSubstResult := {}

  /-- Maps free variables in the new context to levels in the old context (of type Level) -/
  levelBackSubst : HashMap Level Expr := {}

  /-- New free variables in the new context that were newly introduced for irreducible expressions. -/
  abstractedFVars : Array FVarId := #[]

  levelNames : List Name := []

  mayPostpone : Bool
goal: List (Lean.Expr × Qq.Impl.MVarSynth)

full_name: Qq.Impl.UnquoteState.abstractedFVars
code: structure UnquoteState where
  /--
  Quoted mvars in the outside lctx (of type `Level`, `Quoted _`, or `Type`).
  The outside mvars can also be of the form `?m x y z`.
  -/
  mvars : List (Expr × MVarSynth) := []

  /-- Maps quoted expressions (of type Level) in the old context to level parameter names in the new context -/
  levelSubst : HashMap Expr Level := {}

  /-- Maps quoted expressions (of type Expr) in the old context to expressions in the new context -/
  exprSubst : HashMap Expr Expr := {}

  /-- New unquoted local context -/
  unquoted := LocalContext.empty

  /-- Maps free variables in the new context to expressions in the old context (of type Expr) -/
  exprBackSubst : HashMap Expr ExprBackSubstResult := {}

  /-- Maps free variables in the new context to levels in the old context (of type Level) -/
  levelBackSubst : HashMap Level Expr := {}

  /-- New free variables in the new context that were newly introduced for irreducible expressions. -/
  abstractedFVars : Array FVarId := #[]

  levelNames : List Name := []

  mayPostpone : Bool
goal: Array Lean.FVarId

full_name: Qq.Impl.UnquoteState.unquoted
code: structure UnquoteState where
  /--
  Quoted mvars in the outside lctx (of type `Level`, `Quoted _`, or `Type`).
  The outside mvars can also be of the form `?m x y z`.
  -/
  mvars : List (Expr × MVarSynth) := []

  /-- Maps quoted expressions (of type Level) in the old context to level parameter names in the new context -/
  levelSubst : HashMap Expr Level := {}

  /-- Maps quoted expressions (of type Expr) in the old context to expressions in the new context -/
  exprSubst : HashMap Expr Expr := {}

  /-- New unquoted local context -/
  unquoted := LocalContext.empty

  /-- Maps free variables in the new context to expressions in the old context (of type Expr) -/
  exprBackSubst : HashMap Expr ExprBackSubstResult := {}

  /-- Maps free variables in the new context to levels in the old context (of type Level) -/
  levelBackSubst : HashMap Level Expr := {}

  /-- New free variables in the new context that were newly introduced for irreducible expressions. -/
  abstractedFVars : Array FVarId := #[]

  levelNames : List Name := []

  mayPostpone : Bool
goal: Lean.LocalContext

full_name: Qq.Impl.UnquoteState
code: structure UnquoteState where
  /--
  Quoted mvars in the outside lctx (of type `Level`, `Quoted _`, or `Type`).
  The outside mvars can also be of the form `?m x y z`.
  -/
  mvars : List (Expr × MVarSynth) := []

  /-- Maps quoted expressions (of type Level) in the old context to level parameter names in the new context -/
  levelSubst : HashMap Expr Level := {}

  /-- Maps quoted expressions (of type Expr) in the old context to expressions in the new context -/
  exprSubst : HashMap Expr Expr := {}

  /-- New unquoted local context -/
  unquoted := LocalContext.empty

  /-- Maps free variables in the new context to expressions in the old context (of type Expr) -/
  exprBackSubst : HashMap Expr ExprBackSubstResult := {}

  /-- Maps free variables in the new context to levels in the old context (of type Level) -/
  levelBackSubst : HashMap Level Expr := {}

  /-- New free variables in the new context that were newly introduced for irreducible expressions. -/
  abstractedFVars : Array FVarId := #[]

  levelNames : List Name := []

  mayPostpone : Bool
goal: Type

full_name: Qq.Impl.UnquoteState.levelSubst
code: structure UnquoteState where
  /--
  Quoted mvars in the outside lctx (of type `Level`, `Quoted _`, or `Type`).
  The outside mvars can also be of the form `?m x y z`.
  -/
  mvars : List (Expr × MVarSynth) := []

  /-- Maps quoted expressions (of type Level) in the old context to level parameter names in the new context -/
  levelSubst : HashMap Expr Level := {}

  /-- Maps quoted expressions (of type Expr) in the old context to expressions in the new context -/
  exprSubst : HashMap Expr Expr := {}

  /-- New unquoted local context -/
  unquoted := LocalContext.empty

  /-- Maps free variables in the new context to expressions in the old context (of type Expr) -/
  exprBackSubst : HashMap Expr ExprBackSubstResult := {}

  /-- Maps free variables in the new context to levels in the old context (of type Level) -/
  levelBackSubst : HashMap Level Expr := {}

  /-- New free variables in the new context that were newly introduced for irreducible expressions. -/
  abstractedFVars : Array FVarId := #[]

  levelNames : List Name := []

  mayPostpone : Bool
goal: Lean.HashMap Lean.Expr Lean.Level

full_name: Qq.Impl.UnquoteState.exprBackSubst
code: structure UnquoteState where
  /--
  Quoted mvars in the outside lctx (of type `Level`, `Quoted _`, or `Type`).
  The outside mvars can also be of the form `?m x y z`.
  -/
  mvars : List (Expr × MVarSynth) := []

  /-- Maps quoted expressions (of type Level) in the old context to level parameter names in the new context -/
  levelSubst : HashMap Expr Level := {}

  /-- Maps quoted expressions (of type Expr) in the old context to expressions in the new context -/
  exprSubst : HashMap Expr Expr := {}

  /-- New unquoted local context -/
  unquoted := LocalContext.empty

  /-- Maps free variables in the new context to expressions in the old context (of type Expr) -/
  exprBackSubst : HashMap Expr ExprBackSubstResult := {}

  /-- Maps free variables in the new context to levels in the old context (of type Level) -/
  levelBackSubst : HashMap Level Expr := {}

  /-- New free variables in the new context that were newly introduced for irreducible expressions. -/
  abstractedFVars : Array FVarId := #[]

  levelNames : List Name := []

  mayPostpone : Bool
goal: Lean.HashMap Lean.Expr Qq.Impl.ExprBackSubstResult

full_name: Qq.Impl.UnquoteState.exprSubst
code: structure UnquoteState where
  /--
  Quoted mvars in the outside lctx (of type `Level`, `Quoted _`, or `Type`).
  The outside mvars can also be of the form `?m x y z`.
  -/
  mvars : List (Expr × MVarSynth) := []

  /-- Maps quoted expressions (of type Level) in the old context to level parameter names in the new context -/
  levelSubst : HashMap Expr Level := {}

  /-- Maps quoted expressions (of type Expr) in the old context to expressions in the new context -/
  exprSubst : HashMap Expr Expr := {}

  /-- New unquoted local context -/
  unquoted := LocalContext.empty

  /-- Maps free variables in the new context to expressions in the old context (of type Expr) -/
  exprBackSubst : HashMap Expr ExprBackSubstResult := {}

  /-- Maps free variables in the new context to levels in the old context (of type Level) -/
  levelBackSubst : HashMap Level Expr := {}

  /-- New free variables in the new context that were newly introduced for irreducible expressions. -/
  abstractedFVars : Array FVarId := #[]

  levelNames : List Name := []

  mayPostpone : Bool
goal: Lean.HashMap Lean.Expr Lean.Expr

full_name: Qq.Impl.UnquoteM
code: abbrev UnquoteM 
goal: Type

full_name: Qq.Impl.QuoteM
code: abbrev QuoteM 
goal: Type

full_name: Qq.Impl.instMonadLiftQuoteMUnquoteM
code: instance : MonadLift QuoteM UnquoteM 
goal: MonadLift Qq.Impl.QuoteM Qq.Impl.UnquoteM

full_name: Qq.Impl.determineLocalInstances
code: def determineLocalInstances (lctx : LocalContext) : MetaM LocalInstances 
goal: Lean.MetaM Lean.LocalInstances

full_name: Qq.Impl.withUnquotedLCtx
code: def withUnquotedLCtx [MonadControlT MetaM m] [Monad m] [MonadLiftT QuoteM m] (k : m α) : m α 
goal: m α

full_name: Qq.Impl.addDollar
code: def addDollar : Name → Name
  
goal: Lean.Name → Lean.Name

full_name: Qq.Impl.removeDollar
code: def removeDollar : Name → Option Name
  
goal: Lean.Name → Option Lean.Name

full_name: Qq.Impl.stripDollars
code: def stripDollars : Name → Name
  
goal: Lean.Name → Lean.Name

full_name: Qq.Impl.addSyntaxDollar
code: def addSyntaxDollar : Syntax → Syntax
  
goal: Lean.Syntax → Lean.Syntax

full_name: Qq.Impl.mkAbstractedLevelName
code: def mkAbstractedLevelName (e : Expr) : MetaM Name 
goal: Lean.MetaM Lean.Name

full_name: Qq.Impl.isAssignablePattern
code: def isAssignablePattern (e : Expr) : MetaM Bool 
goal: Lean.MetaM Bool

full_name: Qq.Impl.isBad
code: def isBad (e : Expr) : Bool 
goal: Bool

full_name: Qq.Impl.whnf
code: partial def whnf (e : Expr) (e0 : Expr := e) : MetaM Expr 
goal: Lean.MetaM Lean.Expr

full_name: Qq.Impl.whnfR
code: def whnfR (e : Expr) : MetaM Expr 
goal: Lean.MetaM Lean.Expr

full_name: Qq.Impl.unquoteLevelList
code: partial def unquoteLevelList (e : Expr) : UnquoteM (List Level) 
goal: Qq.Impl.UnquoteM (List Lean.Level)

full_name: Qq.Impl.mkAbstractedName
code: def mkAbstractedName (e : Expr) : UnquoteM Name 
goal: Qq.Impl.UnquoteM Lean.Name

full_name: Qq.Impl.betaRev'
code: @[inline] opaque betaRev' (e : Expr) (revArgs : List Expr) : Expr 
goal: Lean.Expr

full_name: Qq.Impl.makeZetaReduce
code: def makeZetaReduce (a : FVarId) (b : Expr) : MetaM (Option LocalContext) 
goal: Lean.MetaM (Option Lean.LocalContext)

full_name: Qq.Impl.makeDefEq
code: def makeDefEq (a b : Expr) : MetaM (Option LocalContext) 
goal: Lean.MetaM (Option Lean.LocalContext)

full_name: Qq.Impl.substLevel
code: def substLevel (a : Name) (b : Level) : UnquoteM Unit 
goal: Qq.Impl.UnquoteM Unit

full_name: Qq.Impl.unquoteLevelLCtx
code: def unquoteLevelLCtx (addDefEqs := true) : UnquoteM Unit 
goal: Qq.Impl.UnquoteM Unit

full_name: Qq.Impl.unquoteLCtx
code: def unquoteLCtx : UnquoteM Unit 
goal: Qq.Impl.UnquoteM Unit

full_name: Qq.Impl.isLevelFVar
code: def isLevelFVar (n : Name) : MetaM (Option Expr) 
goal: Lean.MetaM (Option Lean.Expr)

full_name: Qq.Impl.quoteLevel
code: def quoteLevel : Level → QuoteM Expr
  
goal: Lean.Level → Qq.Impl.QuoteM Lean.Expr

full_name: Qq.Impl.quoteLevelList
code: def quoteLevelList : List Level → QuoteM Expr
  
goal: List Lean.Level → Qq.Impl.QuoteM Lean.Expr

full_name: Qq.Impl.quoteExpr
code: partial def quoteExpr : Expr → QuoteM Expr
  
goal: Lean.Expr → Qq.Impl.QuoteM Lean.Expr

full_name: Qq.Impl.unquoteMVarCore
code: def unquoteMVarCore (mvar : Expr) : UnquoteM Unit 
goal: Qq.Impl.UnquoteM Unit

full_name: Qq.Impl.unquoteMVar
code: def unquoteMVar (mvar : Expr) : UnquoteM Unit 
goal: Qq.Impl.UnquoteM Unit

full_name: Qq.Impl.MVarSynth.isAssigned
code: def MVarSynth.isAssigned : MVarSynth → MetaM Bool
  
goal: Qq.Impl.MVarSynth → Lean.MetaM Bool

full_name: Qq.Impl.MVarSynth.synth
code: def MVarSynth.synth : MVarSynth → QuoteM Expr
  
goal: Qq.Impl.MVarSynth → Qq.Impl.QuoteM Lean.Expr

full_name: Qq.Impl.lctxHasMVar
code: def lctxHasMVar : MetaM Bool 
goal: Lean.MetaM Bool

full_name: Qq.withProcessPostponed
code: @[specialize]
def withProcessPostponed [Monad m] [MonadFinally m] [MonadLiftT MetaM m] (k : m α) : m α 
goal: m α

full_name: Qq.Impl.UnquoteState.withLevelNames
code: def Impl.UnquoteState.withLevelNames (s : UnquoteState) (k : TermElabM (α × Array Name)) : TermElabM α 
goal: Lean.Elab.TermElabM α

full_name: Qq.«termQl(_)»
code: /-- `ql(u)` quotes the universe level `u`. -/
scoped elab "ql(" l:level ")" : term => do
  let ((), s) ← unquoteLevelLCtx.run {mayPostpone := false}
  let l ← s.withLevelNames do
    let l ← elabLevel l
    let refdLevels := (CollectLevelParams.collect (← instantiateLevelMVars l) {}).params
    return (l, refdLevels)
  quoteLevel l s
goal: Lean.ParserDescr

full_name: Qq.«_aux_.lake_packages_Qq_Qq_Macro___elabRules_Qq_termQl(_)_1»
code: /-- `ql(u)` quotes the universe level `u`. -/
scoped elab "ql(" l:level ")" : term => do
  let ((), s) ← unquoteLevelLCtx.run {mayPostpone := false}
  let l ← s.withLevelNames do
    let l ← elabLevel l
    let refdLevels := (CollectLevelParams.collect (← instantiateLevelMVars l) {}).params
    return (l, refdLevels)
  quoteLevel l s
goal: Lean.Elab.Term.TermElab

full_name: Qq.«term_=QL_»
code: /-- `a =QL b` says that the levels `a` and `b` are definitionally equal. -/
scoped syntax atomic(level " =QL ") level : term
goal: Lean.ParserDescr

full_name: Qq.«_aux_.lake_packages_Qq_Qq_Macro___macroRules_Qq_term_=QL__1»
code: macro_rules | `($a:level =QL $b) => `(QuotedLevelDefEq ql($a) ql($b))
goal: Lean.Macro

full_name: Qq.Impl.macro
code: def Impl.macro (t : Syntax) (expectedType : Expr) : TermElabM Expr 
goal: Lean.Elab.TermElabM Lean.Expr

full_name: Qq.«termQ(__)»
code: /-- `q(t)` quotes the Lean expression `t` into a `Q(α)` (if `t : α`) -/
scoped syntax "q(" term Parser.Term.optType ")" : term
goal: Lean.ParserDescr

full_name: Qq.«_aux_.lake_packages_Qq_Qq_Macro___macroRules_Qq_termQ(__)_1»
code: macro_rules | `(q($t : $ty)) => `(q(($t : $ty)))
goal: Lean.Macro

full_name: Qq.«_aux_.lake_packages_Qq_Qq_Macro___elabRules_Qq_termQ(__)_1»
code: elab_rules : term <= expectedType
  | `(q($t)) => do
    let expectedType ← instantiateMVars expectedType
    if expectedType.hasExprMVar then tryPostpone
    if ← lctxHasMVar then tryPostpone
    ensureHasType expectedType $ ← commitIfDidNotPostpone do
      let mut expectedType ← withReducible <| Impl.whnf expectedType
      if !expectedType.isAppOfArity ``Quoted 1 then
        let u ← mkFreshExprMVar (some (.const ``Level []))
        let u' := .app (.const ``Expr.sort []) u
        let t ← mkFreshExprMVar (mkApp (.const ``Quoted []) u')
        expectedType := .app (.const ``Quoted []) t
      Impl.macro t expectedType
goal: Lean.Elab.Term.TermElab

full_name: Qq.«termQ(__)_1»
code: /-- `Q(α)` is the type of Lean expressions having type `α`.  -/
scoped syntax "Q(" term Parser.Term.optType ")" : term
goal: Lean.ParserDescr

full_name: Qq.«_aux_.lake_packages_Qq_Qq_Macro___macroRules_Qq_termQ(__)_1_1»
code: macro_rules | `(Q($t : $ty)) => `(Q(($t : $ty)))
goal: Lean.Macro

full_name: Qq.«_aux_.lake_packages_Qq_Qq_Macro___elabRules_Qq_termQ(__)_1_1»
code: elab_rules : term <= expectedType
  | `(Q($t)) => do
    let expectedType ← instantiateMVars expectedType
    unless ← isDefEq expectedType q(Type) do
      throwError "Q(.) has type Type, expected type is{indentExpr expectedType}"
    commitIfDidNotPostpone do Impl.macro t expectedType
goal: Lean.Elab.Term.TermElab

full_name: Qq.«_aux_.lake_packages_Qq_Qq_Macro___macroRules_Qq_term_=Q__1»
code: /-- `a =Q b` says that `a` and `b` are definitionally equal. -/
scoped notation a:50 " =Q " b:51 => QuotedDefEq q(a) q(b)
goal: Lean.Macro

full_name: Qq.«_aux_.lake_packages_Qq_Qq_Macro___unexpand_Qq_QuotedDefEq_1»
code: /-- `a =Q b` says that `a` and `b` are definitionally equal. -/
scoped notation a:50 " =Q " b:51 => QuotedDefEq q(a) q(b)
goal: Lean.PrettyPrinter.Unexpander

full_name: _private.«.lake».packages.Qq.Qq.Macro.0.Qq.Impl.push
code: private def push [Monad m] (i t l : Syntax) : StateT (Array $ Syntax × Syntax × Syntax) m Unit 
goal: StateT (Array (Lean.Syntax × Lean.Syntax × Lean.Syntax)) m Unit

full_name: Qq.Impl.floatLevelAntiquot'
code: partial def floatLevelAntiquot' [Monad m] [MonadQuotation m] (stx : Syntax) :
    StateT (Array $ Syntax × Syntax × Syntax) m Syntax 
goal: StateT (Array (Lean.Syntax × Lean.Syntax × Lean.Syntax)) m Lean.Syntax

full_name: Qq.Impl.floatExprAntiquot'
code: partial def floatExprAntiquot' [Monad m] [MonadQuotation m] (depth : Nat) :
    Syntax → StateT (Array $ Syntax × Syntax × Syntax) m Syntax
  
goal: Lean.Syntax → StateT (Array (Lean.Syntax × Lean.Syntax × Lean.Syntax)) m Lean.Syntax

full_name: Qq.Impl.floatExprAntiquot
code: partial def floatExprAntiquot [Monad m] [MonadQuotation m] (depth : Nat) :
    Term → StateT (Array $ Ident × Term × Term) m Term 
goal: Lean.Term → StateT (Array (Lean.Ident × Lean.Term × Lean.Term)) m Lean.Term

full_name: Qq.Impl.«_aux_.lake_packages_Qq_Qq_Macro___macroRules_Qq_termQ(__)_1»
code: macro_rules
  | `(Q($t0)) => do
    let (t, lifts) ← floatExprAntiquot 0 t0 #[]
    if lifts.isEmpty && t == t0 then Macro.throwUnsupported
    let mut t ← `(Q($t))
    for (a, ty, lift) in lifts do
      t ← `(let $a:ident : $ty := $lift; $t)
    pure t
  | `(q($t0)) => do
    let (t, lifts) ← floatExprAntiquot 0 t0 #[]
    if lifts.isEmpty && t == t0 then Macro.throwUnsupported
    let mut t ← `(q($t))
    for (a, ty, lift) in lifts do
      t ← `(let $a:ident : $ty := $lift; $t)
    pure t
goal: Lean.Macro

full_name: Qq.Impl.«_aux_.lake_packages_Qq_Qq_Macro___macroRules_Qq_termQ(__)_1_1»
code: macro_rules
  | `(Q($t0)) => do
    let (t, lifts) ← floatExprAntiquot 0 t0 #[]
    if lifts.isEmpty && t == t0 then Macro.throwUnsupported
    let mut t ← `(Q($t))
    for (a, ty, lift) in lifts do
      t ← `(let $a:ident : $ty := $lift; $t)
    pure t
  | `(q($t0)) => do
    let (t, lifts) ← floatExprAntiquot 0 t0 #[]
    if lifts.isEmpty && t == t0 then Macro.throwUnsupported
    let mut t ← `(q($t))
    for (a, ty, lift) in lifts do
      t ← `(let $a:ident : $ty := $lift; $t)
    pure t
goal: Lean.Macro