chore: update stage0
This commit is contained in:
parent
dee3c2c8d8
commit
1072bcfa73
39 changed files with 15962 additions and 3252 deletions
3
stage0/src/Init/Meta.lean
generated
3
stage0/src/Init/Meta.lean
generated
|
|
@ -794,4 +794,5 @@ def expandInterpolatedStr (interpStr : Syntax) (type : Syntax) (toTypeFn : Synta
|
|||
def getSepArgs (stx : Syntax) : Array Syntax :=
|
||||
stx.getArgs.getSepElems
|
||||
|
||||
end Lean.Syntax
|
||||
end Syntax
|
||||
end Lean
|
||||
|
|
|
|||
3
stage0/src/Lean/Elab/Command.lean
generated
3
stage0/src/Lean/Elab/Command.lean
generated
|
|
@ -121,7 +121,8 @@ private def ioErrorToMessage (ctx : Context) (ref : Syntax) (err : IO.Error) : M
|
|||
let ctx ← read
|
||||
IO.toEIO (fun (ex : IO.Error) => Exception.error ctx.ref ex.toString) x
|
||||
|
||||
instance : MonadLiftT IO CommandElabM := { monadLift := liftIO }
|
||||
instance : MonadLiftT IO CommandElabM where
|
||||
monadLift := liftIO
|
||||
|
||||
def getScope : CommandElabM Scope := do pure (← get).scopes.head!
|
||||
|
||||
|
|
|
|||
2
stage0/src/Lean/Elab/DeclUtil.lean
generated
2
stage0/src/Lean/Elab/DeclUtil.lean
generated
|
|
@ -17,7 +17,7 @@ def forallTelescopeCompatibleAux {α} (k : Array Expr → Expr → Expr → Meta
|
|||
unless n₁ == n₂ do
|
||||
throwError! "parameter name mismatch '{n₁}', expected '{n₂}'"
|
||||
unless (← isDefEq d₁ d₂) do
|
||||
throwError! "type mismatch at parameter '{n₁}'{indentExpr d₁}\nexpected type{indentExpr d₂}"
|
||||
throwError! "parameter '{n₁}' {← mkHasTypeButIsExpectedMsg d₁ d₂}"
|
||||
unless c₁.binderInfo == c₂.binderInfo do
|
||||
throwError! "binder annotation mismatch at parameter '{n₁}'"
|
||||
withLocalDecl n₁ c₁.binderInfo d₁ fun x =>
|
||||
|
|
|
|||
1
stage0/src/Lean/Elab/Deriving.lean
generated
1
stage0/src/Lean/Elab/Deriving.lean
generated
|
|
@ -7,3 +7,4 @@ import Lean.Elab.Deriving.Basic
|
|||
import Lean.Elab.Deriving.Util
|
||||
import Lean.Elab.Deriving.Inhabited
|
||||
import Lean.Elab.Deriving.BEq
|
||||
import Lean.Elab.Deriving.DecEq
|
||||
|
|
|
|||
40
stage0/src/Lean/Elab/Deriving/BEq.lean
generated
40
stage0/src/Lean/Elab/Deriving/BEq.lean
generated
|
|
@ -11,44 +11,16 @@ namespace Lean.Elab.Deriving.BEq
|
|||
open Lean.Parser.Term
|
||||
open Meta
|
||||
|
||||
structure Header where
|
||||
binders : Array Syntax
|
||||
argNames : Array Name
|
||||
target1Name : Name
|
||||
target2Name : Name
|
||||
open Binary (Header mkDiscrs)
|
||||
|
||||
def mkHeader (ctx : Context) (indVal : InductiveVal) : TermElabM Header := do
|
||||
let argNames ← mkInductArgNames indVal
|
||||
let binders ← mkImplicitBinders argNames
|
||||
let targetType ← mkInductiveApp indVal argNames
|
||||
let target1Name ← mkFreshUserName `x
|
||||
let target2Name ← mkFreshUserName `y
|
||||
let binders := binders ++ (← mkInstImplicitBinders `BEq indVal argNames)
|
||||
let target1Binder ← `(explicitBinderF| ($(mkIdent target1Name) : $targetType))
|
||||
let target2Binder ← `(explicitBinderF| ($(mkIdent target2Name) : $targetType))
|
||||
let binders := binders ++ #[target1Binder, target2Binder]
|
||||
return {
|
||||
binders := binders
|
||||
argNames := argNames
|
||||
target1Name := target1Name
|
||||
target2Name := target2Name
|
||||
}
|
||||
Binary.mkHeader ctx `BEq indVal
|
||||
|
||||
def mkMatch (ctx : Context) (header : Header) (indVal : InductiveVal) (auxFunName : Name) (argNames : Array Name) : TermElabM Syntax := do
|
||||
let discrs ← mkDiscrs
|
||||
def mkMatch (ctx : Context) (header : Header) (indVal : InductiveVal) (auxFunName : Name) : TermElabM Syntax := do
|
||||
let discrs ← mkDiscrs header indVal
|
||||
let alts ← mkAlts
|
||||
`(match $[$discrs],* with $alts:matchAlt*)
|
||||
where
|
||||
mkDiscr (varName : Name) : TermElabM Syntax :=
|
||||
`(Parser.Term.matchDiscr| $(mkIdent varName):term)
|
||||
|
||||
mkDiscrs : TermElabM (Array Syntax) := do
|
||||
let mut discrs := #[]
|
||||
-- add indices
|
||||
for argName in argNames[indVal.nparams:] do
|
||||
discrs := discrs.push (← mkDiscr argName)
|
||||
return discrs ++ #[← mkDiscr header.target1Name, ← mkDiscr header.target2Name]
|
||||
|
||||
mkElseAlt : TermElabM Syntax := do
|
||||
let mut patterns := #[]
|
||||
-- add `_` pattern for indices
|
||||
|
|
@ -102,7 +74,7 @@ def mkAuxFunction (ctx : Context) (i : Nat) : TermElabM Syntax := do
|
|||
let auxFunName ← ctx.auxFunNames[i]
|
||||
let indVal ← ctx.typeInfos[i]
|
||||
let header ← mkHeader ctx indVal
|
||||
let mut body ← mkMatch ctx header indVal auxFunName header.argNames
|
||||
let mut body ← mkMatch ctx header indVal auxFunName
|
||||
if ctx.usePartial then
|
||||
let letDecls ← mkLocalInstanceLetDecls ctx `BEq header.argNames
|
||||
body ← mkLet letDecls body
|
||||
|
|
@ -122,7 +94,7 @@ def mkMutualBlock (ctx : Context) : TermElabM Syntax := do
|
|||
end)
|
||||
|
||||
private def mkBEqInstanceCmds (declNames : Array Name) : TermElabM (Array Syntax) := do
|
||||
let ctx ← mkContext declNames[0]
|
||||
let ctx ← mkContext "beq" declNames[0]
|
||||
let cmds := #[← mkMutualBlock ctx] ++ (← mkInstanceCmds ctx `BEq declNames)
|
||||
trace[Elab.Deriving.beq]! "\n{cmds}"
|
||||
return cmds
|
||||
|
|
|
|||
113
stage0/src/Lean/Elab/Deriving/DecEq.lean
generated
Normal file
113
stage0/src/Lean/Elab/Deriving/DecEq.lean
generated
Normal file
|
|
@ -0,0 +1,113 @@
|
|||
/-
|
||||
Copyright (c) 2020 Microsoft Corporation. All rights reserved.
|
||||
Released under Apache 2.0 license as described in the file LICENSE.
|
||||
Authors: Leonardo de Moura
|
||||
-/
|
||||
import Lean.Meta.Transform
|
||||
import Lean.Meta.Inductive
|
||||
import Lean.Elab.Deriving.Basic
|
||||
import Lean.Elab.Deriving.Util
|
||||
|
||||
namespace Lean.Elab.Deriving.DecEq
|
||||
open Lean.Parser.Term
|
||||
open Meta
|
||||
open Binary (Header mkDiscrs)
|
||||
|
||||
def mkHeader (ctx : Context) (indVal : InductiveVal) : TermElabM Header := do
|
||||
Binary.mkHeader ctx `DecidableEq indVal
|
||||
|
||||
def mkMatch (ctx : Context) (header : Header) (indVal : InductiveVal) (auxFunName : Name) (argNames : Array Name) : TermElabM Syntax := do
|
||||
let discrs ← mkDiscrs header indVal
|
||||
let alts ← mkAlts
|
||||
`(match $[$discrs],* with $alts:matchAlt*)
|
||||
where
|
||||
mkSameCtorRhs : List (Syntax × Syntax × Bool) → TermElabM Syntax
|
||||
| [] => `(isTrue rfl)
|
||||
| (a, b, false) :: todo => withFreshMacroScope do
|
||||
`(if h : $a = $b then
|
||||
by subst h; exact $(← mkSameCtorRhs todo):term
|
||||
else
|
||||
isFalse (by intro n; injection n; apply h _; assumption))
|
||||
| (a, b, true) :: todo => withFreshMacroScope do
|
||||
`(@dite _ _ ($(mkIdent auxFunName) $a $b)
|
||||
(fun h => by subst h; exact $(← mkSameCtorRhs todo):term)
|
||||
(fun h => isFalse (by intro n; injection n; apply h _; assumption)))
|
||||
|
||||
mkAlts : TermElabM (Array Syntax) := do
|
||||
let mut alts := #[]
|
||||
for ctorName₁ in indVal.ctors do
|
||||
let ctorInfo ← getConstInfoCtor ctorName₁
|
||||
for ctorName₂ in indVal.ctors do
|
||||
let mut patterns := #[]
|
||||
-- add `_` pattern for indices
|
||||
for i in [:indVal.nindices] do
|
||||
patterns := patterns.push (← `(_))
|
||||
if ctorName₁ == ctorName₂ then
|
||||
let alt ← forallTelescopeReducing ctorInfo.type fun xs type => do
|
||||
let type ← Core.betaReduce type -- we 'beta-reduce' to eliminate "artificial" dependencies
|
||||
let mut patterns := patterns
|
||||
let mut ctorArgs1 := #[]
|
||||
let mut ctorArgs2 := #[]
|
||||
-- add `_` for inductive parameters, they are inaccessible
|
||||
for i in [:indVal.nparams] do
|
||||
ctorArgs1 := ctorArgs1.push (← `(_))
|
||||
ctorArgs2 := ctorArgs2.push (← `(_))
|
||||
let mut todo := #[]
|
||||
for i in [:ctorInfo.nfields] do
|
||||
let x := xs[indVal.nparams + i]
|
||||
if type.containsFVar x.fvarId! then
|
||||
-- If resulting type depends on this field, we don't need to compare
|
||||
ctorArgs1 := ctorArgs1.push (← `(_))
|
||||
ctorArgs2 := ctorArgs2.push (← `(_))
|
||||
else
|
||||
let a := mkIdent (← mkFreshUserName `a)
|
||||
let b := mkIdent (← mkFreshUserName `b)
|
||||
ctorArgs1 := ctorArgs1.push a
|
||||
ctorArgs2 := ctorArgs2.push b
|
||||
let recField := (← inferType x).isAppOf indVal.name
|
||||
todo := todo.push (a, b, recField)
|
||||
patterns := patterns.push (← `(@$(mkIdent ctorName₁):ident $ctorArgs1:term*))
|
||||
patterns := patterns.push (← `(@$(mkIdent ctorName₁):ident $ctorArgs2:term*))
|
||||
let rhs ← mkSameCtorRhs todo.toList
|
||||
`(matchAltExpr| | $[$patterns:term],* => $rhs:term)
|
||||
alts := alts.push alt
|
||||
else if (← compatibleCtors ctorName₁ ctorName₂) then
|
||||
patterns := patterns ++ #[(← `($(mkIdent ctorName₁) ..)), (← `($(mkIdent ctorName₂) ..))]
|
||||
let rhs ← `(isFalse (by intro h; injection h))
|
||||
alts ← alts.push (← `(matchAltExpr| | $[$patterns:term],* => $rhs:term))
|
||||
return alts
|
||||
|
||||
def mkAuxFunction (ctx : Context) : TermElabM Syntax := do
|
||||
let auxFunName ← ctx.auxFunNames[0]
|
||||
let indVal ← ctx.typeInfos[0]
|
||||
let header ← mkHeader ctx indVal
|
||||
let mut body ← mkMatch ctx header indVal auxFunName header.argNames
|
||||
let binders := header.binders
|
||||
let type ← `(Decidable ($(mkIdent header.target1Name) = $(mkIdent header.target2Name)))
|
||||
`(private def $(mkIdent auxFunName):ident $binders:explicitBinder* : $type:term := $body:term)
|
||||
|
||||
def mkDecEqCmds (indVal : InductiveVal) : TermElabM (Array Syntax) := do
|
||||
let ctx ← mkContext "decEq" indVal.name
|
||||
let cmds := #[← mkAuxFunction ctx] ++ (← mkInstanceCmds ctx `DecidableEq #[indVal.name] (useAnonCtor := false))
|
||||
trace[Elab.Deriving.decEq]! "\n{cmds}"
|
||||
return cmds
|
||||
|
||||
open Command
|
||||
|
||||
def mkDecEqInstanceHandler (declNames : Array Name) : CommandElabM Bool := do
|
||||
if declNames.size != 1 then
|
||||
return false -- mutually inductive types are not supported yet
|
||||
else
|
||||
let indVal ← getConstInfoInduct declNames[0]
|
||||
if indVal.isNested then
|
||||
return false -- nested inductive types are not supported yet
|
||||
else
|
||||
let cmds ← liftTermElabM none <| mkDecEqCmds indVal
|
||||
cmds.forM elabCommand
|
||||
return true
|
||||
|
||||
builtin_initialize
|
||||
registerBuiltinDerivingHandler `DecidableEq mkDecEqInstanceHandler
|
||||
registerTraceClass `Elab.Deriving.decEq
|
||||
|
||||
end Lean.Elab.Deriving.DecEq
|
||||
45
stage0/src/Lean/Elab/Deriving/Util.lean
generated
45
stage0/src/Lean/Elab/Deriving/Util.lean
generated
|
|
@ -51,7 +51,7 @@ structure Context where
|
|||
auxFunNames : Array Name
|
||||
usePartial : Bool
|
||||
|
||||
def mkContext (typeName : Name) : TermElabM Context := do
|
||||
def mkContext (fnPrefix : String) (typeName : Name) : TermElabM Context := do
|
||||
let indVal ← getConstInfoInduct typeName
|
||||
let mut typeInfos := #[]
|
||||
for typeName in indVal.all do
|
||||
|
|
@ -59,7 +59,7 @@ def mkContext (typeName : Name) : TermElabM Context := do
|
|||
let mut auxFunNames := #[]
|
||||
for typeName in indVal.all do
|
||||
match typeName.eraseMacroScopes with
|
||||
| Name.str _ t _ => auxFunNames := auxFunNames.push (← mkFreshUserName <| Name.mkSimple <| "beq" ++ t)
|
||||
| Name.str _ t _ => auxFunNames := auxFunNames.push (← mkFreshUserName <| Name.mkSimple <| fnPrefix ++ t)
|
||||
| _ => auxFunNames := auxFunNames.push (← mkFreshUserName `instFn)
|
||||
trace[Elab.Deriving.beq]! "{auxFunNames}"
|
||||
let usePartial := indVal.isNested || typeInfos.size > 1
|
||||
|
|
@ -91,7 +91,7 @@ def mkLet (letDecls : Array Syntax) (body : Syntax) : TermElabM Syntax :=
|
|||
letDecls.foldrM (init := body) fun letDecl body =>
|
||||
`(let $letDecl:letDecl; $body)
|
||||
|
||||
def mkInstanceCmds (ctx : Context) (className : Name) (typeNames : Array Name) : TermElabM (Array Syntax) := do
|
||||
def mkInstanceCmds (ctx : Context) (className : Name) (typeNames : Array Name) (useAnonCtor := true) : TermElabM (Array Syntax) := do
|
||||
let mut instances := #[]
|
||||
for i in [:ctx.typeInfos.size] do
|
||||
let indVal := ctx.typeInfos[i]
|
||||
|
|
@ -102,10 +102,47 @@ def mkInstanceCmds (ctx : Context) (className : Name) (typeNames : Array Name) :
|
|||
let binders := binders ++ (← mkInstImplicitBinders className indVal argNames)
|
||||
let indType ← mkInductiveApp indVal argNames
|
||||
let type ← `($(mkIdent className) $indType)
|
||||
let val ← `(⟨$(mkIdent auxFunName)⟩)
|
||||
let val ← if useAnonCtor then `(⟨$(mkIdent auxFunName)⟩) else pure <| mkIdent auxFunName
|
||||
let instCmd ← `(instance $binders:implicitBinder* : $type := $val)
|
||||
trace[Meta.debug]! "\n{instCmd}"
|
||||
instances := instances.push instCmd
|
||||
return instances
|
||||
|
||||
namespace Binary
|
||||
|
||||
structure Header where
|
||||
binders : Array Syntax
|
||||
argNames : Array Name
|
||||
target1Name : Name
|
||||
target2Name : Name
|
||||
|
||||
def mkHeader (ctx : Context) (className : Name) (indVal : InductiveVal) : TermElabM Header := do
|
||||
let argNames ← mkInductArgNames indVal
|
||||
let binders ← mkImplicitBinders argNames
|
||||
let targetType ← mkInductiveApp indVal argNames
|
||||
let target1Name ← mkFreshUserName `x
|
||||
let target2Name ← mkFreshUserName `y
|
||||
let binders := binders ++ (← mkInstImplicitBinders className indVal argNames)
|
||||
let target1Binder ← `(explicitBinderF| ($(mkIdent target1Name) : $targetType))
|
||||
let target2Binder ← `(explicitBinderF| ($(mkIdent target2Name) : $targetType))
|
||||
let binders := binders ++ #[target1Binder, target2Binder]
|
||||
return {
|
||||
binders := binders
|
||||
argNames := argNames
|
||||
target1Name := target1Name
|
||||
target2Name := target2Name
|
||||
}
|
||||
|
||||
def mkDiscr (varName : Name) : TermElabM Syntax :=
|
||||
`(Parser.Term.matchDiscr| $(mkIdent varName):term)
|
||||
|
||||
def mkDiscrs (header : Header) (indVal : InductiveVal) : TermElabM (Array Syntax) := do
|
||||
let mut discrs := #[]
|
||||
-- add indices
|
||||
for argName in header.argNames[indVal.nparams:] do
|
||||
discrs := discrs.push (← mkDiscr argName)
|
||||
return discrs ++ #[← mkDiscr header.target1Name, ← mkDiscr header.target2Name]
|
||||
|
||||
end Binary
|
||||
|
||||
end Lean.Elab.Deriving
|
||||
|
|
|
|||
11
stage0/src/Lean/Elab/Tactic/Basic.lean
generated
11
stage0/src/Lean/Elab/Tactic/Basic.lean
generated
|
|
@ -54,23 +54,22 @@ def BacktrackableState.restore (b : BacktrackableState) : TacticM Unit := do
|
|||
let b ← saveBacktrackableState
|
||||
try x catch ex => b.restore; h ex
|
||||
|
||||
instance : MonadExcept Exception TacticM := {
|
||||
throw := throw,
|
||||
instance : MonadExcept Exception TacticM where
|
||||
throw := throw
|
||||
tryCatch := Tactic.tryCatch
|
||||
}
|
||||
|
||||
@[inline] protected def orElse {α} (x y : TacticM α) : TacticM α := do
|
||||
try x catch _ => y
|
||||
|
||||
instance {α} : OrElse (TacticM α) := ⟨Tactic.orElse⟩
|
||||
instance {α} : OrElse (TacticM α) where
|
||||
orElse := Tactic.orElse
|
||||
|
||||
structure SavedState where
|
||||
core : Core.State
|
||||
meta : Meta.State
|
||||
term : Term.State
|
||||
tactic : State
|
||||
|
||||
instance : Inhabited SavedState := ⟨⟨arbitrary, arbitrary, arbitrary, arbitrary⟩⟩
|
||||
deriving Inhabited
|
||||
|
||||
def saveAllState : TacticM SavedState := do
|
||||
pure { core := (← getThe Core.State), meta := (← getThe Meta.State), term := (← getThe Term.State), tactic := (← get) }
|
||||
|
|
|
|||
2
stage0/src/Lean/Elab/Tactic/Induction.lean
generated
2
stage0/src/Lean/Elab/Tactic/Induction.lean
generated
|
|
@ -143,7 +143,7 @@ def setMotiveArg (mvarId : MVarId) (motiveArg : MVarId) (targets : Array FVarId)
|
|||
let motiverInferredType ← inferType motive
|
||||
let motiveType ← inferType (mkMVar motiveArg)
|
||||
unless (← isDefEqGuarded motiverInferredType motiveType) do
|
||||
throwError! "type mismatch when assigning motive{indentExpr motive}\nhas type{indentExpr motiverInferredType}\nexpected type{indentExpr motiveType}"
|
||||
throwError! "type mismatch when assigning motive{indentExpr motive}\n{← mkHasTypeButIsExpectedMsg motiverInferredType motiveType}"
|
||||
assignExprMVar motiveArg motive
|
||||
|
||||
private def getAltNumFields (elimInfo : ElimInfo) (altName : Name) : TermElabM Nat := do
|
||||
|
|
|
|||
69
stage0/src/Lean/Elab/Term.lean
generated
69
stage0/src/Lean/Elab/Term.lean
generated
|
|
@ -212,8 +212,8 @@ def applyResult (result : TermElabResult) : TermElabM Expr :=
|
|||
@[inline] def liftCoreM {α} (x : CoreM α) : TermElabM α :=
|
||||
Term.liftMetaM $ liftM x
|
||||
|
||||
instance : MonadLiftT MetaM TermElabM :=
|
||||
⟨Term.liftMetaM⟩
|
||||
instance : MonadLiftT MetaM TermElabM where
|
||||
monadLift := Term.liftMetaM
|
||||
|
||||
def getLevelNames : TermElabM (List Name) :=
|
||||
return (← get).levelNames
|
||||
|
|
@ -223,24 +223,22 @@ def getFVarLocalDecl! (fvar : Expr) : TermElabM LocalDecl := do
|
|||
| some d => pure d
|
||||
| none => unreachable!
|
||||
|
||||
instance : AddErrorMessageContext TermElabM := {
|
||||
add := fun ref msg => do
|
||||
instance : AddErrorMessageContext TermElabM where
|
||||
add ref msg := do
|
||||
let ctx ← read
|
||||
let ref := getBetterRef ref ctx.macroStack
|
||||
let msg ← addMessageContext msg
|
||||
let msg ← addMacroStack msg ctx.macroStack
|
||||
pure (ref, msg)
|
||||
}
|
||||
|
||||
instance : MonadLog TermElabM := {
|
||||
getRef := getRef,
|
||||
getFileMap := do pure (← read).fileMap,
|
||||
getFileName := do pure (← read).fileName,
|
||||
logMessage := fun msg => do
|
||||
instance : MonadLog TermElabM where
|
||||
getRef := getRef
|
||||
getFileMap := return (← read).fileMap
|
||||
getFileName := return (← read).fileName
|
||||
logMessage msg := do
|
||||
let ctx ← readThe Core.Context
|
||||
let msg := { msg with data := MessageData.withNamingContext { currNamespace := ctx.currNamespace, openDecls := ctx.openDecls } msg.data };
|
||||
modify fun s => { s with messages := s.messages.add msg }
|
||||
}
|
||||
|
||||
protected def getCurrMacroScope : TermElabM MacroScope := do pure (← read).currMacroScope
|
||||
protected def getMainModule : TermElabM Name := do pure (← getEnv).mainModule
|
||||
|
|
@ -249,11 +247,10 @@ protected def getMainModule : TermElabM Name := do pure (← getEnv).mainMod
|
|||
let fresh ← modifyGetThe Core.State (fun st => (st.nextMacroScope, { st with nextMacroScope := st.nextMacroScope + 1 }))
|
||||
withReader (fun ctx => { ctx with currMacroScope := fresh }) x
|
||||
|
||||
instance : MonadQuotation TermElabM := {
|
||||
getCurrMacroScope := Term.getCurrMacroScope,
|
||||
getMainModule := Term.getMainModule,
|
||||
instance : MonadQuotation TermElabM where
|
||||
getCurrMacroScope := Term.getCurrMacroScope
|
||||
getMainModule := Term.getMainModule
|
||||
withFreshMacroScope := Term.withFreshMacroScope
|
||||
}
|
||||
|
||||
unsafe def mkTermElabAttributeUnsafe : IO (KeyedDeclsAttribute TermElab) :=
|
||||
mkElabAttribute TermElab `Lean.Elab.Term.termElabAttribute `builtinTermElab `termElab `Lean.Parser.Term `Lean.Elab.Term.TermElab "term"
|
||||
|
|
@ -274,10 +271,11 @@ inductive LVal where
|
|||
| fieldName (name : String)
|
||||
| getOp (idx : Syntax)
|
||||
|
||||
instance : ToString LVal := ⟨fun
|
||||
| LVal.fieldIdx i => toString i
|
||||
| LVal.fieldName n => n
|
||||
| LVal.getOp idx => "[" ++ toString idx ++ "]"⟩
|
||||
instance : ToString LVal where
|
||||
toString
|
||||
| LVal.fieldIdx i => toString i
|
||||
| LVal.fieldName n => n
|
||||
| LVal.getOp idx => "[" ++ toString idx ++ "]"
|
||||
|
||||
def getDeclName? : TermElabM (Option Name) := return (← read).declName?
|
||||
def getLetRecsToLift : TermElabM (List LetRecToLift) := return (← get).letRecsToLift
|
||||
|
|
@ -301,10 +299,10 @@ def withoutErrToSorry {α} (x : TermElabM α) : TermElabM α :=
|
|||
|
||||
builtin_initialize
|
||||
registerOption `autoBoundImplicitLocal {
|
||||
defValue := true,
|
||||
group := "",
|
||||
defValue := true
|
||||
group := ""
|
||||
descr := "Unbound local variables in declaration headers become implicit arguments if they are a lower case or greek letter. For example, `def f (x : Vector α n) : Vector α n :=` automatically introduces the implicit variables {α n}"
|
||||
}
|
||||
}
|
||||
|
||||
private def getAutoBoundImplicitLocalOption (opts : Options) : Bool :=
|
||||
opts.get `autoBoundImplicitLocal true
|
||||
|
|
@ -482,14 +480,14 @@ def applyAttributesAt (declName : Name) (attrs : Array Attribute) (applicationTi
|
|||
def applyAttributes (declName : Name) (attrs : Array Attribute) : TermElabM Unit :=
|
||||
applyAttributesCore declName attrs none
|
||||
|
||||
def mkTypeMismatchError (header? : Option String) (e : Expr) (eType : Expr) (expectedType : Expr) : MessageData :=
|
||||
def mkTypeMismatchError (header? : Option String) (e : Expr) (eType : Expr) (expectedType : Expr) : TermElabM MessageData := do
|
||||
let header : MessageData := match header? with
|
||||
| some header => m!"{header} has type"
|
||||
| none => m!"type mismatch{indentExpr e}\nhas type"
|
||||
m!"{header}{indentExpr eType}\nbut is expected to have type{indentExpr expectedType}"
|
||||
| some header => m!"{header} "
|
||||
| none => m!"type mismatch{indentExpr e}\n"
|
||||
m!"{header}{← mkHasTypeButIsExpectedMsg eType expectedType}"
|
||||
|
||||
def throwTypeMismatchError {α} (header? : Option String) (expectedType : Expr) (eType : Expr) (e : Expr)
|
||||
(f? : Option Expr := none) (extraMsg? : Option MessageData := none) : TermElabM α :=
|
||||
(f? : Option Expr := none) (extraMsg? : Option MessageData := none) : TermElabM α := do
|
||||
/-
|
||||
We ignore `extraMsg?` for now. In all our tests, it contained no useful information. It was
|
||||
always of the form:
|
||||
|
|
@ -506,7 +504,7 @@ def throwTypeMismatchError {α} (header? : Option String) (expectedType : Expr)
|
|||
| some extraMsg => Format.line ++ extraMsg;
|
||||
-/
|
||||
match f? with
|
||||
| none => throwError $ mkTypeMismatchError header? e eType expectedType ++ extraMsg
|
||||
| none => throwError <| (← mkTypeMismatchError header? e eType expectedType) ++ extraMsg
|
||||
| some f => Meta.throwAppTypeMismatch f e extraMsg
|
||||
|
||||
@[inline] def withoutMacroStackAtErr {α} (x : TermElabM α) : TermElabM α :=
|
||||
|
|
@ -893,11 +891,10 @@ private def elabUsingElabFns (stx : Syntax) (expectedType? : Option Expr) (catch
|
|||
| some elabFns => elabUsingElabFnsAux s stx expectedType? catchExPostpone elabFns
|
||||
| none => throwError! "elaboration function for '{k}' has not been implemented"
|
||||
|
||||
instance : MonadMacroAdapter TermElabM := {
|
||||
getCurrMacroScope := getCurrMacroScope,
|
||||
getNextMacroScope := return (← getThe Core.State).nextMacroScope,
|
||||
setNextMacroScope := fun next => modifyThe Core.State fun s => { s with nextMacroScope := next }
|
||||
}
|
||||
instance : MonadMacroAdapter TermElabM where
|
||||
getCurrMacroScope := getCurrMacroScope
|
||||
getNextMacroScope := return (← getThe Core.State).nextMacroScope
|
||||
setNextMacroScope next := modifyThe Core.State fun s => { s with nextMacroScope := next }
|
||||
|
||||
private def isExplicit (stx : Syntax) : Bool :=
|
||||
match stx with
|
||||
|
|
@ -1332,13 +1329,13 @@ private def mkSomeContext : Context := {
|
|||
let ((a, s), sCore, sMeta) ← (x.run ctx s).toIO ctxCore sCore ctxMeta sMeta
|
||||
pure (a, sCore, sMeta, s)
|
||||
|
||||
instance {α} [MetaEval α] : MetaEval (TermElabM α) :=
|
||||
⟨fun env opts x _ =>
|
||||
instance {α} [MetaEval α] : MetaEval (TermElabM α) where
|
||||
eval env opts x _ :=
|
||||
let x : TermElabM α := do
|
||||
try x finally
|
||||
let s ← get
|
||||
s.messages.forM fun msg => do IO.println (← msg.toString)
|
||||
MetaEval.eval env opts (hideUnit := true) $ x.run' mkSomeContext⟩
|
||||
MetaEval.eval env opts (hideUnit := true) $ x.run' mkSomeContext
|
||||
|
||||
end Term
|
||||
|
||||
|
|
|
|||
1
stage0/src/Lean/Meta.lean
generated
1
stage0/src/Lean/Meta.lean
generated
|
|
@ -27,3 +27,4 @@ import Lean.Meta.ForEachExpr
|
|||
import Lean.Meta.Transform
|
||||
import Lean.Meta.PPGoal
|
||||
import Lean.Meta.UnificationHint
|
||||
import Lean.Meta.Inductive
|
||||
|
|
|
|||
83
stage0/src/Lean/Meta/Check.lean
generated
83
stage0/src/Lean/Meta/Check.lean
generated
|
|
@ -36,13 +36,94 @@ private def getFunctionDomain (f : Expr) : MetaM (Expr × BinderInfo) := do
|
|||
| Expr.forallE _ d _ c => return (d, c.binderInfo)
|
||||
| _ => throwFunctionExpected f
|
||||
|
||||
/-
|
||||
Given to expressions `a` and `b`, this method tries to annotate terms with `pp.explicit := true` to
|
||||
expose "implicit" differences. For example, suppose `a` and `b` are of the form
|
||||
```lean
|
||||
@HashMap Nat Nat eqInst hasInst1
|
||||
@HashMap Nat Nat eqInst hasInst2
|
||||
```
|
||||
By default, the pretty printer formats both of them as `HashMap Nat Nat`.
|
||||
So, counterintuitive error messages such as
|
||||
```lean
|
||||
error: application type mismatch
|
||||
HashMap.insert m
|
||||
argument
|
||||
m
|
||||
has type
|
||||
HashMap Nat Nat
|
||||
but is expected to have type
|
||||
HashMap Nat Nat
|
||||
```
|
||||
would be produced.
|
||||
By adding `pp.explicit := true`, we can generate the more informative error
|
||||
```lean
|
||||
error: application type mismatch
|
||||
HashMap.insert m
|
||||
argument
|
||||
m
|
||||
has type
|
||||
@HashMap Nat Nat eqInst hasInst1
|
||||
but is expected to have type
|
||||
@HashMap Nat Nat eqInst hasInst2
|
||||
```
|
||||
Remark: this method implements a simple heuristic, we should extend it as we find other counterintuitive
|
||||
error messages.
|
||||
-/
|
||||
partial def addPPExplicitToExposeDiff (a b : Expr) : MetaM (Expr × Expr) := do
|
||||
if (← getOptions).getBool `pp.all false || (← getOptions).getBool `pp.explicit false then
|
||||
return (a, b)
|
||||
else
|
||||
visit a b
|
||||
where
|
||||
visit (a b : Expr) : MetaM (Expr × Expr) := do
|
||||
try
|
||||
if !a.isApp || !b.isApp then
|
||||
return (a, b)
|
||||
else if a.getAppNumArgs != b.getAppNumArgs then
|
||||
return (a, b)
|
||||
else if not (← isDefEq a.getAppFn b.getAppFn) then
|
||||
return (a, b)
|
||||
else
|
||||
let fType ← inferType a.getAppFn
|
||||
forallBoundedTelescope fType a.getAppNumArgs fun xs _ => do
|
||||
let mut as := a.getAppArgs
|
||||
let mut bs := b.getAppArgs
|
||||
if (← hasExplicitDiff xs as bs) then
|
||||
return (a, b)
|
||||
else
|
||||
for i in [:as.size] do
|
||||
let (ai, bi) ← visit as[i] bs[i]
|
||||
as := as.set! i ai
|
||||
bs := bs.set! i bi
|
||||
let a := mkAppN a.getAppFn as
|
||||
let b := mkAppN b.getAppFn bs
|
||||
return (a.setAppPPExplicit, b.setAppPPExplicit)
|
||||
catch _ =>
|
||||
return (a, b)
|
||||
|
||||
hasExplicitDiff (xs as bs : Array Expr) : MetaM Bool := do
|
||||
for i in [:xs.size] do
|
||||
let localDecl ← getLocalDecl xs[i].fvarId!
|
||||
if localDecl.binderInfo.isExplicit then
|
||||
if not (← isDefEq as[i] bs[i]) then
|
||||
return true
|
||||
return false
|
||||
|
||||
/-
|
||||
Return error message "has type{givenType}\nbut is expected to have type{expectedType}"
|
||||
-/
|
||||
def mkHasTypeButIsExpectedMsg (givenType expectedType : Expr) : MetaM MessageData := do
|
||||
let (givenType, expectedType) ← addPPExplicitToExposeDiff givenType expectedType
|
||||
m!"has type{indentExpr givenType}\nbut is expected to have type{indentExpr expectedType}"
|
||||
|
||||
def throwAppTypeMismatch {α} (f a : Expr) (extraMsg : MessageData := Format.nil) : MetaM α := do
|
||||
let (expectedType, binfo) ← getFunctionDomain f
|
||||
let mut e := mkApp f a
|
||||
unless binfo.isExplicit do
|
||||
e := e.setAppPPExplicit
|
||||
let aType ← inferType a
|
||||
throwError! "application type mismatch{indentExpr e}\nargument{indentExpr a}\nhas type{indentExpr aType}\nbut is expected to have type{indentExpr expectedType}{extraMsg}"
|
||||
throwError! "application type mismatch{indentExpr e}\nargument{indentExpr a}\n{← mkHasTypeButIsExpectedMsg aType expectedType}"
|
||||
|
||||
def checkApp (f a : Expr) : MetaM Unit := do
|
||||
let fType ← inferType f
|
||||
|
|
|
|||
23
stage0/src/Lean/Meta/Inductive.lean
generated
Normal file
23
stage0/src/Lean/Meta/Inductive.lean
generated
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
/-
|
||||
Copyright (c) 2020 Microsoft Corporation. All rights reserved.
|
||||
Released under Apache 2.0 license as described in the file LICENSE.
|
||||
Authors: Leonardo de Moura
|
||||
-/
|
||||
import Lean.Meta.ExprDefEq
|
||||
|
||||
/- Helper methods for inductive datatypes -/
|
||||
|
||||
namespace Lean.Meta
|
||||
|
||||
/- Return true if the types of the given constructors are compatible. -/
|
||||
def compatibleCtors (ctorName₁ ctorName₂ : Name) : MetaM Bool := do
|
||||
let ctorInfo₁ ← getConstInfoCtor ctorName₁
|
||||
let ctorInfo₂ ← getConstInfoCtor ctorName₂
|
||||
if ctorInfo₁.induct != ctorInfo₂.induct then
|
||||
return false
|
||||
else
|
||||
let (_, _, ctorType₁) ← forallMetaTelescope ctorInfo₁.type
|
||||
let (_, _, ctorType₂) ← forallMetaTelescope ctorInfo₂.type
|
||||
isDefEq ctorType₁ ctorType₂
|
||||
|
||||
end Lean.Meta
|
||||
4
stage0/src/Lean/Meta/Match/Basic.lean
generated
4
stage0/src/Lean/Meta/Match/Basic.lean
generated
|
|
@ -3,6 +3,7 @@ Copyright (c) 2020 Microsoft Corporation. All rights reserved.
|
|||
Released under Apache 2.0 license as described in the file LICENSE.
|
||||
Authors: Leonardo de Moura
|
||||
-/
|
||||
import Lean.Meta.Check
|
||||
import Lean.Meta.Match.MatcherInfo
|
||||
import Lean.Meta.Match.CaseArraySizes
|
||||
|
||||
|
|
@ -177,8 +178,9 @@ def checkAndReplaceFVarId (fvarId : FVarId) (v : Expr) (alt : Alt) : MetaM Alt :
|
|||
let vType ← inferType v
|
||||
unless (← isDefEqGuarded fvarDecl.type vType) do
|
||||
withExistingLocalDecls alt.fvarDecls do
|
||||
let (expectedType, givenType) ← addPPExplicitToExposeDiff vType fvarDecl.type
|
||||
throwErrorAt alt.ref $
|
||||
m!"type mismatch during dependent match-elimination at pattern variable '{mkFVar fvarDecl.fvarId}' with type{indentExpr fvarDecl.type}\nexpected type{indentExpr vType}"
|
||||
m!"type mismatch during dependent match-elimination at pattern variable '{mkFVar fvarDecl.fvarId}' with type{indentExpr givenType}\nexpected type{indentExpr expectedType}"
|
||||
pure $ replaceFVarId fvarId v alt
|
||||
|
||||
end Alt
|
||||
|
|
|
|||
6
stage0/src/Lean/Meta/Tactic/Assert.lean
generated
6
stage0/src/Lean/Meta/Tactic/Assert.lean
generated
|
|
@ -27,7 +27,7 @@ def assert (mvarId : MVarId) (name : Name) (type : Expr) (val : Expr) : MetaM MV
|
|||
Convert the given goal `Ctx |- target` into `Ctx |- let name : type := val; target`.
|
||||
It assumes `val` has type `type` -/
|
||||
def define (mvarId : MVarId) (name : Name) (type : Expr) (val : Expr) : MetaM MVarId := do
|
||||
withMVarContext mvarId $ do
|
||||
withMVarContext mvarId do
|
||||
checkNotAssigned mvarId `define
|
||||
let tag ← getMVarTag mvarId
|
||||
let target ← getMVarType mvarId
|
||||
|
|
@ -40,7 +40,7 @@ def define (mvarId : MVarId) (name : Name) (type : Expr) (val : Expr) : MetaM MV
|
|||
Convert the given goal `Ctx |- target` into `Ctx |- (hName : type) -> hName = val -> target`.
|
||||
It assumes `val` has type `type` -/
|
||||
def assertExt (mvarId : MVarId) (name : Name) (type : Expr) (val : Expr) (hName : Name := `h) : MetaM MVarId := do
|
||||
withMVarContext mvarId $ do
|
||||
withMVarContext mvarId do
|
||||
checkNotAssigned mvarId `assert
|
||||
let tag ← getMVarTag mvarId
|
||||
let target ← getMVarType mvarId
|
||||
|
|
@ -62,7 +62,7 @@ structure AssertAfterResult where
|
|||
It assumes `val` has type `type`, and that `type` is well-formed after `fvarId`.
|
||||
Note that `val` does not need to be well-formed after `fvarId`. That is, it may contain variables that are defined after `fvarId`. -/
|
||||
def assertAfter (mvarId : MVarId) (fvarId : FVarId) (userName : Name) (type : Expr) (val : Expr) : MetaM AssertAfterResult := do
|
||||
withMVarContext mvarId $ do
|
||||
withMVarContext mvarId do
|
||||
checkNotAssigned mvarId `assertAfter
|
||||
let tag ← getMVarTag mvarId
|
||||
let target ← getMVarType mvarId
|
||||
|
|
|
|||
19
stage0/src/Lean/Meta/Tactic/Injection.lean
generated
19
stage0/src/Lean/Meta/Tactic/Injection.lean
generated
|
|
@ -57,12 +57,15 @@ private def heqToEq (mvarId : MVarId) (fvarId : FVarId) : MetaM (FVarId × MVarI
|
|||
match type.heq? with
|
||||
| none => pure (fvarId, mvarId)
|
||||
| some (α, a, β, b) =>
|
||||
let pr ← mkEqOfHEq (mkFVar fvarId)
|
||||
let eq ← mkEq a b
|
||||
let mvarId ← assert mvarId decl.userName eq pr
|
||||
let mvarId ← clear mvarId fvarId
|
||||
let (fvarId, mvarId) ← intro1P mvarId
|
||||
pure (fvarId, mvarId)
|
||||
if (← isDefEq α β) then
|
||||
let pr ← mkEqOfHEq (mkFVar fvarId)
|
||||
let eq ← mkEq a b
|
||||
let mvarId ← assert mvarId decl.userName eq pr
|
||||
let mvarId ← clear mvarId fvarId
|
||||
let (fvarId, mvarId) ← intro1P mvarId
|
||||
pure (fvarId, mvarId)
|
||||
else
|
||||
pure (fvarId, mvarId)
|
||||
|
||||
def injectionIntro : Nat → MVarId → Array FVarId → List Name → MetaM InjectionResult
|
||||
| 0, mvarId, fvarIds, remainingNames =>
|
||||
|
|
@ -79,6 +82,8 @@ def injectionIntro : Nat → MVarId → Array FVarId → List Name → MetaM Inj
|
|||
def injection (mvarId : MVarId) (fvarId : FVarId) (newNames : List Name := []) (useUnusedNames : Bool := true) : MetaM InjectionResult := do
|
||||
match (← injectionCore mvarId fvarId) with
|
||||
| InjectionResultCore.solved => pure InjectionResult.solved
|
||||
| InjectionResultCore.subgoal mvarId numEqs => injectionIntro numEqs mvarId #[] newNames
|
||||
| InjectionResultCore.subgoal mvarId numEqs =>
|
||||
trace[Meta.debug]! "before injectionIntro\n{MessageData.ofGoal mvarId}"
|
||||
injectionIntro numEqs mvarId #[] newNames
|
||||
|
||||
end Lean.Meta
|
||||
|
|
|
|||
121
stage0/src/Lean/Meta/Tactic/Subst.lean
generated
121
stage0/src/Lean/Meta/Tactic/Subst.lean
generated
|
|
@ -15,6 +15,7 @@ namespace Lean.Meta
|
|||
|
||||
def substCore (mvarId : MVarId) (hFVarId : FVarId) (symm := false) (fvarSubst : FVarSubst := {}) (clearH := true) : MetaM (FVarSubst × MVarId) :=
|
||||
withMVarContext mvarId do
|
||||
let mvarId0 := mvarId
|
||||
let tag ← getMVarTag mvarId
|
||||
checkNotAssigned mvarId `subst
|
||||
let hFVarIdOriginal := hFVarId
|
||||
|
|
@ -40,61 +41,77 @@ def substCore (mvarId : MVarId) (hFVarId : FVarId) (symm := false) (fvarSubst :
|
|||
let a := mkFVar aFVarId
|
||||
let hFVarId := twoVars[1]
|
||||
let h := mkFVar hFVarId
|
||||
withMVarContext mvarId do
|
||||
let mvarDecl ← getMVarDecl mvarId
|
||||
let type := mvarDecl.type
|
||||
let hLocalDecl ← getLocalDecl hFVarId
|
||||
match (← matchEq? hLocalDecl.type) with
|
||||
| none => unreachable!
|
||||
| some (α, lhs, rhs) => do
|
||||
let b := if symm then lhs else rhs
|
||||
let mctx ← getMCtx
|
||||
let depElim := mctx.exprDependsOn mvarDecl.type hFVarId
|
||||
let cont (motive : Expr) (newType : Expr) : MetaM (FVarSubst × MVarId) := do
|
||||
let major ← if symm then pure h else mkEqSymm h
|
||||
let newMVar ← mkFreshExprSyntheticOpaqueMVar newType tag
|
||||
let minor := newMVar
|
||||
let newVal ← if depElim then mkEqRec motive minor major else mkEqNDRec motive minor major
|
||||
assignExprMVar mvarId newVal
|
||||
let mvarId := newMVar.mvarId!
|
||||
let mvarId ←
|
||||
if clearH then
|
||||
let mvarId ← clear mvarId hFVarId
|
||||
clear mvarId aFVarId
|
||||
/- Set skip to true if there is no local variable nor the target depend on the equality -/
|
||||
let skip ←
|
||||
if vars.size == 2 then
|
||||
pure false
|
||||
else
|
||||
let mvarType ← getMVarType mvarId
|
||||
let mctx ← getMCtx
|
||||
pure (!mctx.exprDependsOn mvarType aFVarId && !mctx.exprDependsOn mvarType hFVarId)
|
||||
if skip then
|
||||
if clearH then
|
||||
let mvarId ← clear mvarId0 hFVarId
|
||||
let mvarId ← clear mvarId aFVarId
|
||||
pure ({}, mvarId)
|
||||
else
|
||||
pure ({}, mvarId0)
|
||||
else
|
||||
withMVarContext mvarId do
|
||||
let mvarDecl ← getMVarDecl mvarId
|
||||
let type := mvarDecl.type
|
||||
let hLocalDecl ← getLocalDecl hFVarId
|
||||
match (← matchEq? hLocalDecl.type) with
|
||||
| none => unreachable!
|
||||
| some (α, lhs, rhs) => do
|
||||
let b := if symm then lhs else rhs
|
||||
let mctx ← getMCtx
|
||||
let depElim := mctx.exprDependsOn mvarDecl.type hFVarId
|
||||
let cont (motive : Expr) (newType : Expr) : MetaM (FVarSubst × MVarId) := do
|
||||
let major ← if symm then pure h else mkEqSymm h
|
||||
let newMVar ← mkFreshExprSyntheticOpaqueMVar newType tag
|
||||
let minor := newMVar
|
||||
let newVal ← if depElim then mkEqRec motive minor major else mkEqNDRec motive minor major
|
||||
assignExprMVar mvarId newVal
|
||||
let mvarId := newMVar.mvarId!
|
||||
let mvarId ←
|
||||
if clearH then
|
||||
let mvarId ← clear mvarId hFVarId
|
||||
clear mvarId aFVarId
|
||||
else
|
||||
pure mvarId
|
||||
let (newFVars, mvarId) ← introNP mvarId (vars.size - 2)
|
||||
let fvarSubst ← newFVars.size.foldM (init := fvarSubst) fun i (fvarSubst : FVarSubst) =>
|
||||
let var := vars[i+2]
|
||||
let newFVar := newFVars[i]
|
||||
pure $ fvarSubst.insert var (mkFVar newFVar)
|
||||
let fvarSubst := fvarSubst.insert aFVarIdOriginal (if clearH then b else mkFVar aFVarId)
|
||||
let fvarSubst := fvarSubst.insert hFVarIdOriginal (mkFVar hFVarId)
|
||||
pure (fvarSubst, mvarId)
|
||||
if depElim then do
|
||||
let newType := type.replaceFVar a b
|
||||
let reflB ← mkEqRefl b
|
||||
let newType := newType.replaceFVar h reflB
|
||||
if symm then
|
||||
let motive ← mkLambdaFVars #[a, h] type
|
||||
cont motive newType
|
||||
else
|
||||
pure mvarId
|
||||
let (newFVars, mvarId) ← introNP mvarId (vars.size - 2)
|
||||
let fvarSubst ← newFVars.size.foldM (init := fvarSubst) fun i (fvarSubst : FVarSubst) =>
|
||||
let var := vars[i+2]
|
||||
let newFVar := newFVars[i]
|
||||
pure $ fvarSubst.insert var (mkFVar newFVar)
|
||||
let fvarSubst := fvarSubst.insert aFVarIdOriginal (if clearH then b else mkFVar aFVarId)
|
||||
let fvarSubst := fvarSubst.insert hFVarIdOriginal (mkFVar hFVarId)
|
||||
pure (fvarSubst, mvarId)
|
||||
if depElim then do
|
||||
let newType := type.replaceFVar a b
|
||||
let reflB ← mkEqRefl b
|
||||
let newType := newType.replaceFVar h reflB
|
||||
if symm then
|
||||
let motive ← mkLambdaFVars #[a, h] type
|
||||
cont motive newType
|
||||
/- `type` depends on (h : a = b). So, we use the following trick to avoid a type incorrect motive.
|
||||
1- Create a new local (hAux : b = a)
|
||||
2- Create newType := type [hAux.symm / h]
|
||||
`newType` is type correct because `h` and `hAux.symm` are definitionally equal by proof irrelevance.
|
||||
3- Create motive by abstracting `a` and `hAux` in `newType`. -/
|
||||
let hAuxType ← mkEq b a
|
||||
let motive ← withLocalDeclD `_h hAuxType fun hAux => do
|
||||
let hAuxSymm ← mkEqSymm hAux
|
||||
/- replace h in type with hAuxSymm -/
|
||||
let newType := type.replaceFVar h hAuxSymm
|
||||
mkLambdaFVars #[a, hAux] newType
|
||||
cont motive newType
|
||||
else
|
||||
/- `type` depends on (h : a = b). So, we use the following trick to avoid a type incorrect motive.
|
||||
1- Create a new local (hAux : b = a)
|
||||
2- Create newType := type [hAux.symm / h]
|
||||
`newType` is type correct because `h` and `hAux.symm` are definitionally equal by proof irrelevance.
|
||||
3- Create motive by abstracting `a` and `hAux` in `newType`. -/
|
||||
let hAuxType ← mkEq b a
|
||||
let motive ← withLocalDeclD `_h hAuxType fun hAux => do
|
||||
let hAuxSymm ← mkEqSymm hAux
|
||||
/- replace h in type with hAuxSymm -/
|
||||
let newType := type.replaceFVar h hAuxSymm
|
||||
mkLambdaFVars #[a, hAux] newType
|
||||
let motive ← mkLambdaFVars #[a] type
|
||||
let newType := type.replaceFVar a b
|
||||
cont motive newType
|
||||
else
|
||||
let motive ← mkLambdaFVars #[a] type
|
||||
let newType := type.replaceFVar a b
|
||||
cont motive newType
|
||||
| _ =>
|
||||
let eqMsg := if symm then "(t = x)" else "(x = t)"
|
||||
throwTacticEx `subst mvarId
|
||||
|
|
|
|||
96
stage0/src/library/compiler/ir_interpreter.cpp
generated
96
stage0/src/library/compiler/ir_interpreter.cpp
generated
|
|
@ -298,7 +298,7 @@ void * lookup_symbol_in_cur_exe(char const * sym) {
|
|||
}
|
||||
|
||||
class interpreter;
|
||||
LEAN_THREAD_PTR(interpreter, g_interpreter);
|
||||
static interpreter & get_interpreter();
|
||||
|
||||
class interpreter {
|
||||
// stack of IR variable slots
|
||||
|
|
@ -314,12 +314,10 @@ class interpreter {
|
|||
frame(name const & mFn, size_t mArgBp, size_t mJpBp) : m_fn(mFn), m_arg_bp(mArgBp), m_jp_bp(mJpBp) {}
|
||||
};
|
||||
std::vector<frame> m_call_stack;
|
||||
environment const & m_env;
|
||||
options const & m_opts;
|
||||
environment const * m_env;
|
||||
options const * m_opts;
|
||||
// if `false`, use IR code where possible
|
||||
bool m_prefer_native;
|
||||
// if we were called within the execution of a different interpreter, restore the value of `g_interpreter` in the end
|
||||
interpreter * m_prev_interpreter;
|
||||
struct constant_cache_entry {
|
||||
bool m_is_scalar;
|
||||
value m_val;
|
||||
|
|
@ -352,6 +350,37 @@ class interpreter {
|
|||
return m_arg_stack[i];
|
||||
}
|
||||
|
||||
public:
|
||||
template<class T>
|
||||
static inline T with_interpreter(environment const & env, options const & opts, std::function<T(interpreter &)> const & f) {
|
||||
interpreter & interp = get_interpreter();
|
||||
if (interp.m_env && is_eqp(*interp.m_env, env) && interp.m_opts && is_eqp(*interp.m_opts, opts)) {
|
||||
return f(interp);
|
||||
} else {
|
||||
// We changed threads or the closure was stored and called in a different context.
|
||||
time_task t("interpretation",
|
||||
message_builder(env, get_global_ios(), "foo", pos_info(), message_severity::INFORMATION));
|
||||
abstract_type_context trace_ctx(opts);
|
||||
scope_trace_env scope_trace(env, opts, trace_ctx);
|
||||
flet<environment const *> fl1(interp.m_env, &env);
|
||||
flet<options const *> fl2(interp.m_opts, &opts);
|
||||
flet<bool> fl3(interp.m_prefer_native, opts.get_bool(*g_interpreter_prefer_native, LEAN_DEFAULT_INTERPRETER_PREFER_NATIVE));
|
||||
if (interp.m_env) {
|
||||
// both these caches contain data from the Environment, so we cannot reuse them when changing it
|
||||
flet<name_map<constant_cache_entry>> fl4(interp.m_constant_cache, {});
|
||||
flet<name_map<symbol_cache_entry>> fl5(interp.m_symbol_cache, {});
|
||||
return f(interp);
|
||||
} else {
|
||||
// if there is no outer interpreter, might as well leave the caches around; maybe the next call is for
|
||||
// the same Environment
|
||||
interp.m_constant_cache = {};
|
||||
interp.m_symbol_cache = {};
|
||||
return f(interp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
value eval_arg(arg const & a) {
|
||||
// an "irrelevant" argument is type- or proof-erased; we can use an arbitrary value for it
|
||||
return arg_is_irrelevant(a) ? box(0) : var(arg_var_id(a));
|
||||
|
|
@ -383,8 +412,8 @@ class interpreter {
|
|||
object * mk_stub_closure(decl const & d, unsigned n, object ** args) {
|
||||
unsigned cls_size = 3 + decl_params(d).size();
|
||||
object * cls = alloc_closure(get_stub(cls_size), cls_size, 3 + n);
|
||||
closure_set(cls, 0, m_env.to_obj_arg());
|
||||
closure_set(cls, 1, m_opts.to_obj_arg());
|
||||
closure_set(cls, 0, m_env->to_obj_arg());
|
||||
closure_set(cls, 1, m_opts->to_obj_arg());
|
||||
closure_set(cls, 2, d.to_obj_arg());
|
||||
for (unsigned i = 0; i < n ; i++)
|
||||
closure_set(cls, 3 + i, args[i]);
|
||||
|
|
@ -712,7 +741,7 @@ class interpreter {
|
|||
return *e;
|
||||
} else {
|
||||
symbol_cache_entry e_new { get_decl(fn), nullptr, false };
|
||||
if (m_prefer_native || decl_tag(e_new.m_decl) == decl_kind::Extern || has_init_attribute(m_env, fn)) {
|
||||
if (m_prefer_native || decl_tag(e_new.m_decl) == decl_kind::Extern || has_init_attribute(*m_env, fn)) {
|
||||
string_ref mangled = name_mangle(fn, *g_mangle_prefix);
|
||||
string_ref boxed_mangled(string_append(mangled.to_obj_arg(), g_boxed_mangled_suffix->raw()));
|
||||
// check for boxed version first
|
||||
|
|
@ -731,7 +760,7 @@ class interpreter {
|
|||
|
||||
/** \brief Retrieve Lean declaration from environment. */
|
||||
decl get_decl(name const & fn) {
|
||||
option_ref<decl> d = find_ir_decl(m_env, fn);
|
||||
option_ref<decl> d = find_ir_decl(*m_env, fn);
|
||||
if (!d) {
|
||||
throw exception(sstream() << "unknown declaration '" << fn << "'");
|
||||
}
|
||||
|
|
@ -751,7 +780,7 @@ class interpreter {
|
|||
return *o;
|
||||
}
|
||||
|
||||
if (get_regular_init_fn_name_for(m_env, fn)) {
|
||||
if (get_regular_init_fn_name_for(*m_env, fn)) {
|
||||
// We don't know whether `[init]` decls can be re-executed, so let's not.
|
||||
throw exception(sstream() << "cannot evaluate `[init]` declaration '" << fn << "' in the same module");
|
||||
}
|
||||
|
|
@ -838,21 +867,13 @@ class interpreter {
|
|||
return r;
|
||||
}
|
||||
|
||||
// closure stub stub
|
||||
// static closure stub
|
||||
static object * stub_m_aux(object ** args) {
|
||||
environment env(args[0]);
|
||||
options opts(args[1]);
|
||||
if (g_interpreter && is_eqp(g_interpreter->m_env, env)) {
|
||||
return g_interpreter->stub_m(args);
|
||||
} else {
|
||||
// We changed threads or the closure was stored and called in a different context.
|
||||
// Create new interpreter with new stacks.
|
||||
time_task t("interpretation",
|
||||
message_builder(env, get_global_ios(), "foo", pos_info(), message_severity::INFORMATION));
|
||||
abstract_type_context trace_ctx(opts);
|
||||
scope_trace_env scope_trace(env, opts, trace_ctx);
|
||||
return interpreter(env, opts).stub_m(args);
|
||||
}
|
||||
return with_interpreter<object *>(env, opts, [&](interpreter & interp) {
|
||||
return interp.stub_m(args);
|
||||
});
|
||||
}
|
||||
|
||||
// python3 -c 'for i in range(1,17): print(f" static object * stub_{i}_aux(" + ", ".join([f"object * x_{j}" for j in range(1,i+1)]) + ") { object * args[] = { " + ", ".join([f"x_{j}" for j in range(1,i+1)]) + " }; return interpreter::stub_m_aux(args); }")'
|
||||
|
|
@ -896,20 +917,12 @@ class interpreter {
|
|||
}
|
||||
}
|
||||
public:
|
||||
explicit interpreter(environment const & env, options const & opts) : m_env(env), m_opts(opts) {
|
||||
m_prev_interpreter = g_interpreter;
|
||||
g_interpreter = this;
|
||||
m_prefer_native = opts.get_bool(*g_interpreter_prefer_native, LEAN_DEFAULT_INTERPRETER_PREFER_NATIVE);
|
||||
}
|
||||
|
||||
~interpreter() {
|
||||
for_each(m_constant_cache, [](name const &, constant_cache_entry const & e) {
|
||||
if (!e.m_is_scalar) {
|
||||
dec(e.m_val.m_obj);
|
||||
}
|
||||
});
|
||||
lean_assert(g_interpreter == this);
|
||||
g_interpreter = m_prev_interpreter;
|
||||
}
|
||||
|
||||
/** A variant of `call` designed for external uses.
|
||||
|
|
@ -931,7 +944,7 @@ public:
|
|||
} else {
|
||||
// `lookup_symbol` does not prefer the boxed version for interpreted functions, so check manually.
|
||||
decl d = e.m_decl;
|
||||
if (option_ref<decl> d_boxed = find_ir_decl(m_env, fn + *g_boxed_suffix)) {
|
||||
if (option_ref<decl> d_boxed = find_ir_decl(*m_env, fn + *g_boxed_suffix)) {
|
||||
d = *d_boxed.get();
|
||||
}
|
||||
r = mk_stub_closure(d, 0, nullptr);
|
||||
|
|
@ -1001,30 +1014,27 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
MK_THREAD_LOCAL_GET_DEF(interpreter, get_interpreter);
|
||||
|
||||
object * run_boxed(environment const & env, options const & opts, name const & fn, unsigned n, object **args) {
|
||||
return interpreter(env, opts).call_boxed(fn, n, args);
|
||||
return interpreter::with_interpreter<object *>(env, opts, [&](interpreter & interp) { return interp.call_boxed(fn, n, args); });
|
||||
}
|
||||
uint32 run_main(environment const & env, options const & opts, int argv, char * argc[]) {
|
||||
return interpreter(env, opts).run_main(argv, argc);
|
||||
return interpreter::with_interpreter<uint32>(env, opts, [&](interpreter & interp) { return interp.run_main(argv, argc); });
|
||||
}
|
||||
|
||||
extern "C" object * lean_eval_const(object * lenv, object * lopts, object * c) {
|
||||
environment const & env = TO_REF(environment, lenv);
|
||||
options const & opts = TO_REF(options, lopts);
|
||||
time_task t("interpretation",
|
||||
message_builder(environment(), get_global_ios(), "foo", pos_info(), message_severity::INFORMATION));
|
||||
abstract_type_context trace_ctx(opts);
|
||||
scope_trace_env scope_trace(env, opts, trace_ctx);
|
||||
|
||||
extern "C" object * lean_eval_const(object * env, object * opts, object * c) {
|
||||
try {
|
||||
return mk_cnstr(1, run_boxed(env, opts, TO_REF(name, c), 0, 0)).steal();
|
||||
return mk_cnstr(1, run_boxed(TO_REF(environment, env), TO_REF(options, opts), TO_REF(name, c), 0, 0)).steal();
|
||||
} catch (exception & ex) {
|
||||
return mk_cnstr(0, string_ref(ex.what())).steal();
|
||||
}
|
||||
}
|
||||
|
||||
extern "C" object * lean_run_init(object * env, object * opts, object * decl, object * init_decl, object *) {
|
||||
return interpreter(TO_REF(environment, env), TO_REF(options, opts)).run_init(TO_REF(name, decl), TO_REF(name, init_decl));
|
||||
return interpreter::with_interpreter<object *>(TO_REF(environment, env), TO_REF(options, opts), [&](interpreter & interp) {
|
||||
return interp.run_init(TO_REF(name, decl), TO_REF(name, init_decl));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
2
stage0/stdlib/CMakeLists.txt
generated
2
stage0/stdlib/CMakeLists.txt
generated
File diff suppressed because one or more lines are too long
2
stage0/stdlib/Lean/Elab/Command.c
generated
2
stage0/stdlib/Lean/Elab/Command.c
generated
|
|
@ -13022,7 +13022,7 @@ _start:
|
|||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6;
|
||||
x_1 = l_Lean_Elab_Command_modifyScope___closed__1;
|
||||
x_2 = l_Lean_Elab_Command_modifyScope___closed__2;
|
||||
x_3 = lean_unsigned_to_nat(380u);
|
||||
x_3 = lean_unsigned_to_nat(381u);
|
||||
x_4 = lean_unsigned_to_nat(16u);
|
||||
x_5 = l_Lean_Syntax_strLitToAtom___closed__3;
|
||||
x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5);
|
||||
|
|
|
|||
117
stage0/stdlib/Lean/Elab/DeclUtil.c
generated
117
stage0/stdlib/Lean/Elab/DeclUtil.c
generated
|
|
@ -86,6 +86,7 @@ lean_object* l_Lean_throwError___at_Lean_Meta_forallTelescopeCompatibleAux___spe
|
|||
lean_object* lean_array_swap(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_throwError___at_Lean_Meta_forallTelescopeCompatibleAux___spec__19___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_forallTelescopeCompatibleAux___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_mkHasTypeButIsExpectedMsg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_throwError___at_Lean_Meta_forallTelescopeCompatibleAux___spec__12(lean_object*);
|
||||
lean_object* l_Lean_Elab_sortDeclLevelParams___lambda__1___boxed(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_forallTelescopeCompatible___rarg___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -185,7 +186,6 @@ lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Elab_sortDeclLevelParams___spec
|
|||
lean_object* l_Lean_Meta_forallTelescopeCompatibleAux___rarg___lambda__3(uint64_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, uint64_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_throwError___at_Lean_Meta_forallTelescopeCompatibleAux___spec__21(lean_object*);
|
||||
lean_object* l_Lean_throwError___at_Lean_Meta_forallTelescopeCompatibleAux___spec__1(lean_object*);
|
||||
lean_object* l_Lean_indentExpr(lean_object*);
|
||||
lean_object* l_Lean_throwError___at_Lean_Meta_forallTelescopeCompatibleAux___spec__24___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_isFreshInstanceName_match__1(lean_object*);
|
||||
lean_object* l_Lean_throwError___at_Lean_Meta_forallTelescopeCompatibleAux___spec__2(lean_object*);
|
||||
|
|
@ -1505,7 +1505,7 @@ static lean_object* _init_l_Lean_Meta_forallTelescopeCompatibleAux___rarg___lamb
|
|||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_mk_string("type mismatch at parameter '");
|
||||
x_1 = lean_mk_string("parameter '");
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
|
|
@ -1522,7 +1522,7 @@ static lean_object* _init_l_Lean_Meta_forallTelescopeCompatibleAux___rarg___lamb
|
|||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_mk_string("\nexpected type");
|
||||
x_1 = lean_mk_string("' ");
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
|
|
@ -1555,7 +1555,7 @@ x_19 = lean_unbox(x_18);
|
|||
lean_dec(x_18);
|
||||
if (x_19 == 0)
|
||||
{
|
||||
lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; uint8_t x_35;
|
||||
lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; uint8_t x_33;
|
||||
lean_dec(x_8);
|
||||
lean_dec(x_7);
|
||||
lean_dec(x_6);
|
||||
|
|
@ -1564,71 +1564,72 @@ lean_dec(x_4);
|
|||
x_20 = lean_ctor_get(x_17, 1);
|
||||
lean_inc(x_20);
|
||||
lean_dec(x_17);
|
||||
x_21 = lean_alloc_ctor(4, 1, 0);
|
||||
lean_ctor_set(x_21, 0, x_9);
|
||||
x_22 = l_Lean_Meta_forallTelescopeCompatibleAux___rarg___lambda__4___closed__2;
|
||||
x_23 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_23, 0, x_22);
|
||||
lean_ctor_set(x_23, 1, x_21);
|
||||
x_24 = l_Lean_KernelException_toMessageData___closed__3;
|
||||
x_25 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_25, 0, x_23);
|
||||
lean_ctor_set(x_25, 1, x_24);
|
||||
x_26 = l_Lean_indentExpr(x_1);
|
||||
x_27 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_27, 0, x_25);
|
||||
lean_ctor_set(x_27, 1, x_26);
|
||||
x_28 = l_Lean_Meta_forallTelescopeCompatibleAux___rarg___lambda__4___closed__4;
|
||||
lean_inc(x_15);
|
||||
lean_inc(x_14);
|
||||
lean_inc(x_13);
|
||||
lean_inc(x_12);
|
||||
x_21 = l_Lean_Meta_mkHasTypeButIsExpectedMsg(x_1, x_2, x_12, x_13, x_14, x_15, x_20);
|
||||
x_22 = lean_ctor_get(x_21, 0);
|
||||
lean_inc(x_22);
|
||||
x_23 = lean_ctor_get(x_21, 1);
|
||||
lean_inc(x_23);
|
||||
lean_dec(x_21);
|
||||
x_24 = lean_alloc_ctor(4, 1, 0);
|
||||
lean_ctor_set(x_24, 0, x_9);
|
||||
x_25 = l_Lean_Meta_forallTelescopeCompatibleAux___rarg___lambda__4___closed__2;
|
||||
x_26 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_26, 0, x_25);
|
||||
lean_ctor_set(x_26, 1, x_24);
|
||||
x_27 = l_Lean_Meta_forallTelescopeCompatibleAux___rarg___lambda__4___closed__4;
|
||||
x_28 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_28, 0, x_26);
|
||||
lean_ctor_set(x_28, 1, x_27);
|
||||
x_29 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_29, 0, x_27);
|
||||
lean_ctor_set(x_29, 1, x_28);
|
||||
x_30 = l_Lean_indentExpr(x_2);
|
||||
lean_ctor_set(x_29, 0, x_28);
|
||||
lean_ctor_set(x_29, 1, x_22);
|
||||
x_30 = l_Lean_KernelException_toMessageData___closed__15;
|
||||
x_31 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_31, 0, x_29);
|
||||
lean_ctor_set(x_31, 1, x_30);
|
||||
x_32 = l_Lean_KernelException_toMessageData___closed__15;
|
||||
x_33 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_33, 0, x_31);
|
||||
lean_ctor_set(x_33, 1, x_32);
|
||||
x_34 = l_Lean_throwError___at_Lean_Meta_forallTelescopeCompatibleAux___spec__16(x_33, x_12, x_13, x_14, x_15, x_20);
|
||||
x_32 = l_Lean_throwError___at_Lean_Meta_forallTelescopeCompatibleAux___spec__16(x_31, x_12, x_13, x_14, x_15, x_23);
|
||||
lean_dec(x_15);
|
||||
lean_dec(x_14);
|
||||
lean_dec(x_13);
|
||||
lean_dec(x_12);
|
||||
x_35 = !lean_is_exclusive(x_34);
|
||||
if (x_35 == 0)
|
||||
x_33 = !lean_is_exclusive(x_32);
|
||||
if (x_33 == 0)
|
||||
{
|
||||
return x_34;
|
||||
return x_32;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_36; lean_object* x_37; lean_object* x_38;
|
||||
x_36 = lean_ctor_get(x_34, 0);
|
||||
x_37 = lean_ctor_get(x_34, 1);
|
||||
lean_inc(x_37);
|
||||
lean_inc(x_36);
|
||||
lean_dec(x_34);
|
||||
x_38 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_38, 0, x_36);
|
||||
lean_ctor_set(x_38, 1, x_37);
|
||||
return x_38;
|
||||
lean_object* x_34; lean_object* x_35; lean_object* x_36;
|
||||
x_34 = lean_ctor_get(x_32, 0);
|
||||
x_35 = lean_ctor_get(x_32, 1);
|
||||
lean_inc(x_35);
|
||||
lean_inc(x_34);
|
||||
lean_dec(x_32);
|
||||
x_36 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_36, 0, x_34);
|
||||
lean_ctor_set(x_36, 1, x_35);
|
||||
return x_36;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_39; lean_object* x_40; lean_object* x_41;
|
||||
lean_object* x_37; lean_object* x_38; lean_object* x_39;
|
||||
lean_dec(x_2);
|
||||
x_39 = lean_ctor_get(x_17, 1);
|
||||
lean_inc(x_39);
|
||||
x_37 = lean_ctor_get(x_17, 1);
|
||||
lean_inc(x_37);
|
||||
lean_dec(x_17);
|
||||
x_40 = lean_box(0);
|
||||
x_41 = l_Lean_Meta_forallTelescopeCompatibleAux___rarg___lambda__3(x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_1, x_10, x_40, x_12, x_13, x_14, x_15, x_39);
|
||||
return x_41;
|
||||
x_38 = lean_box(0);
|
||||
x_39 = l_Lean_Meta_forallTelescopeCompatibleAux___rarg___lambda__3(x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_1, x_10, x_38, x_12, x_13, x_14, x_15, x_37);
|
||||
return x_39;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_42;
|
||||
uint8_t x_40;
|
||||
lean_dec(x_15);
|
||||
lean_dec(x_14);
|
||||
lean_dec(x_13);
|
||||
|
|
@ -1641,23 +1642,23 @@ lean_dec(x_5);
|
|||
lean_dec(x_4);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
x_42 = !lean_is_exclusive(x_17);
|
||||
if (x_42 == 0)
|
||||
x_40 = !lean_is_exclusive(x_17);
|
||||
if (x_40 == 0)
|
||||
{
|
||||
return x_17;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_43; lean_object* x_44; lean_object* x_45;
|
||||
x_43 = lean_ctor_get(x_17, 0);
|
||||
x_44 = lean_ctor_get(x_17, 1);
|
||||
lean_inc(x_44);
|
||||
lean_inc(x_43);
|
||||
lean_object* x_41; lean_object* x_42; lean_object* x_43;
|
||||
x_41 = lean_ctor_get(x_17, 0);
|
||||
x_42 = lean_ctor_get(x_17, 1);
|
||||
lean_inc(x_42);
|
||||
lean_inc(x_41);
|
||||
lean_dec(x_17);
|
||||
x_45 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_45, 0, x_43);
|
||||
lean_ctor_set(x_45, 1, x_44);
|
||||
return x_45;
|
||||
x_43 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_43, 0, x_41);
|
||||
lean_ctor_set(x_43, 1, x_42);
|
||||
return x_43;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
6
stage0/stdlib/Lean/Elab/Deriving.c
generated
6
stage0/stdlib/Lean/Elab/Deriving.c
generated
|
|
@ -1,6 +1,6 @@
|
|||
// Lean compiler output
|
||||
// Module: Lean.Elab.Deriving
|
||||
// Imports: Init Lean.Elab.Deriving.Basic Lean.Elab.Deriving.Util Lean.Elab.Deriving.Inhabited Lean.Elab.Deriving.BEq
|
||||
// Imports: Init Lean.Elab.Deriving.Basic Lean.Elab.Deriving.Util Lean.Elab.Deriving.Inhabited Lean.Elab.Deriving.BEq Lean.Elab.Deriving.DecEq
|
||||
#include <lean/lean.h>
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic ignored "-Wunused-parameter"
|
||||
|
|
@ -18,6 +18,7 @@ lean_object* initialize_Lean_Elab_Deriving_Basic(lean_object*);
|
|||
lean_object* initialize_Lean_Elab_Deriving_Util(lean_object*);
|
||||
lean_object* initialize_Lean_Elab_Deriving_Inhabited(lean_object*);
|
||||
lean_object* initialize_Lean_Elab_Deriving_BEq(lean_object*);
|
||||
lean_object* initialize_Lean_Elab_Deriving_DecEq(lean_object*);
|
||||
static bool _G_initialized = false;
|
||||
lean_object* initialize_Lean_Elab_Deriving(lean_object* w) {
|
||||
lean_object * res;
|
||||
|
|
@ -38,6 +39,9 @@ lean_dec_ref(res);
|
|||
res = initialize_Lean_Elab_Deriving_BEq(lean_io_mk_world());
|
||||
if (lean_io_result_is_error(res)) return res;
|
||||
lean_dec_ref(res);
|
||||
res = initialize_Lean_Elab_Deriving_DecEq(lean_io_mk_world());
|
||||
if (lean_io_result_is_error(res)) return res;
|
||||
lean_dec_ref(res);
|
||||
return lean_io_result_mk_ok(lean_box(0));
|
||||
}
|
||||
#ifdef __cplusplus
|
||||
|
|
|
|||
1234
stage0/stdlib/Lean/Elab/Deriving/BEq.c
generated
1234
stage0/stdlib/Lean/Elab/Deriving/BEq.c
generated
File diff suppressed because it is too large
Load diff
7344
stage0/stdlib/Lean/Elab/Deriving/DecEq.c
generated
Normal file
7344
stage0/stdlib/Lean/Elab/Deriving/DecEq.c
generated
Normal file
File diff suppressed because it is too large
Load diff
56
stage0/stdlib/Lean/Elab/Deriving/Inhabited.c
generated
56
stage0/stdlib/Lean/Elab/Deriving/Inhabited.c
generated
|
|
@ -13,8 +13,8 @@
|
|||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___spec__1___closed__11;
|
||||
lean_object* l_Lean_getConstInfo___at_Lean_Elab_Term_mkConst___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
extern lean_object* l_Lean_Meta_forallTelescopeCompatibleAux___rarg___lambda__4___closed__4;
|
||||
lean_object* l___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmdWith(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -109,7 +109,6 @@ lean_object* l___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedIn
|
|||
extern lean_object* l_Lean_myMacro____x40_Init_NotationExtra___hyg_1127____closed__7;
|
||||
lean_object* l___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_List_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstance___spec__6(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___spec__1___closed__12;
|
||||
lean_object* l___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_addLocalInstancesForParamsAux_match__1(lean_object*);
|
||||
lean_object* lean_array_get(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Expr_fvarId_x21(lean_object*);
|
||||
|
|
@ -5940,7 +5939,7 @@ static lean_object* _init_l_Std_Range_forIn_loop___at___private_Lean_Elab_Derivi
|
|||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_mk_string("' ");
|
||||
x_1 = lean_mk_string(" because of field with type");
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
|
|
@ -5957,7 +5956,7 @@ static lean_object* _init_l_Std_Range_forIn_loop___at___private_Lean_Elab_Derivi
|
|||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_mk_string(" because of field with type");
|
||||
x_1 = lean_mk_string("(assuming parameters are inhabited)");
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
|
|
@ -5974,7 +5973,7 @@ static lean_object* _init_l_Std_Range_forIn_loop___at___private_Lean_Elab_Derivi
|
|||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_mk_string("(assuming parameters are inhabited)");
|
||||
x_1 = lean_mk_string("checking ");
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
|
|
@ -5991,7 +5990,7 @@ static lean_object* _init_l_Std_Range_forIn_loop___at___private_Lean_Elab_Derivi
|
|||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_mk_string("checking ");
|
||||
x_1 = lean_mk_string(" for '");
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
|
|
@ -6004,23 +6003,6 @@ x_2 = l_Lean_stringToMessageData(x_1);
|
|||
return x_2;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___spec__1___closed__11() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_mk_string(" for '");
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___spec__1___closed__12() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2;
|
||||
x_1 = l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___spec__1___closed__11;
|
||||
x_2 = l_Lean_stringToMessageData(x_1);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___spec__1(lean_object* x_1, uint8_t x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14, lean_object* x_15) {
|
||||
_start:
|
||||
{
|
||||
|
|
@ -6238,7 +6220,7 @@ x_71 = l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lea
|
|||
x_72 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_72, 0, x_71);
|
||||
lean_ctor_set(x_72, 1, x_70);
|
||||
x_73 = l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___spec__1___closed__4;
|
||||
x_73 = l_Lean_Meta_forallTelescopeCompatibleAux___rarg___lambda__4___closed__4;
|
||||
x_74 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_74, 0, x_72);
|
||||
lean_ctor_set(x_74, 1, x_73);
|
||||
|
|
@ -6250,7 +6232,7 @@ x_76 = l_Lean_KernelException_toMessageData___closed__15;
|
|||
x_77 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_77, 0, x_74);
|
||||
lean_ctor_set(x_77, 1, x_76);
|
||||
x_78 = l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___spec__1___closed__6;
|
||||
x_78 = l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___spec__1___closed__4;
|
||||
x_79 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_79, 0, x_77);
|
||||
lean_ctor_set(x_79, 1, x_78);
|
||||
|
|
@ -6310,11 +6292,11 @@ goto block_39;
|
|||
else
|
||||
{
|
||||
lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; uint8_t x_105;
|
||||
x_96 = l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___spec__1___closed__8;
|
||||
x_96 = l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___spec__1___closed__6;
|
||||
x_97 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_97, 0, x_74);
|
||||
lean_ctor_set(x_97, 1, x_96);
|
||||
x_98 = l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___spec__1___closed__6;
|
||||
x_98 = l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___spec__1___closed__4;
|
||||
x_99 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_99, 0, x_97);
|
||||
lean_ctor_set(x_99, 1, x_98);
|
||||
|
|
@ -6560,7 +6542,7 @@ x_159 = l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Le
|
|||
x_160 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_160, 0, x_159);
|
||||
lean_ctor_set(x_160, 1, x_158);
|
||||
x_161 = l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___spec__1___closed__4;
|
||||
x_161 = l_Lean_Meta_forallTelescopeCompatibleAux___rarg___lambda__4___closed__4;
|
||||
x_162 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_162, 0, x_160);
|
||||
lean_ctor_set(x_162, 1, x_161);
|
||||
|
|
@ -6572,7 +6554,7 @@ x_164 = l_Lean_KernelException_toMessageData___closed__15;
|
|||
x_165 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_165, 0, x_162);
|
||||
lean_ctor_set(x_165, 1, x_164);
|
||||
x_166 = l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___spec__1___closed__6;
|
||||
x_166 = l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___spec__1___closed__4;
|
||||
x_167 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_167, 0, x_165);
|
||||
lean_ctor_set(x_167, 1, x_166);
|
||||
|
|
@ -6632,11 +6614,11 @@ goto block_39;
|
|||
else
|
||||
{
|
||||
lean_object* x_184; lean_object* x_185; lean_object* x_186; lean_object* x_187; lean_object* x_188; lean_object* x_189; lean_object* x_190; lean_object* x_191; lean_object* x_192; uint8_t x_193;
|
||||
x_184 = l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___spec__1___closed__8;
|
||||
x_184 = l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___spec__1___closed__6;
|
||||
x_185 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_185, 0, x_162);
|
||||
lean_ctor_set(x_185, 1, x_184);
|
||||
x_186 = l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___spec__1___closed__6;
|
||||
x_186 = l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___spec__1___closed__4;
|
||||
x_187 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_187, 0, x_185);
|
||||
lean_ctor_set(x_187, 1, x_186);
|
||||
|
|
@ -6768,11 +6750,11 @@ lean_object* x_229; lean_object* x_230; lean_object* x_231; lean_object* x_232;
|
|||
lean_inc(x_52);
|
||||
x_229 = lean_alloc_ctor(2, 1, 0);
|
||||
lean_ctor_set(x_229, 0, x_52);
|
||||
x_230 = l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___spec__1___closed__10;
|
||||
x_230 = l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___spec__1___closed__8;
|
||||
x_231 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_231, 0, x_230);
|
||||
lean_ctor_set(x_231, 1, x_229);
|
||||
x_232 = l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___spec__1___closed__12;
|
||||
x_232 = l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___spec__1___closed__10;
|
||||
x_233 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_233, 0, x_231);
|
||||
lean_ctor_set(x_233, 1, x_232);
|
||||
|
|
@ -7452,7 +7434,7 @@ x_73 = l___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstance
|
|||
x_74 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_74, 0, x_73);
|
||||
lean_ctor_set(x_74, 1, x_72);
|
||||
x_75 = l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___spec__1___closed__4;
|
||||
x_75 = l_Lean_Meta_forallTelescopeCompatibleAux___rarg___lambda__4___closed__4;
|
||||
x_76 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_76, 0, x_74);
|
||||
lean_ctor_set(x_76, 1, x_75);
|
||||
|
|
@ -7488,7 +7470,7 @@ goto block_69;
|
|||
else
|
||||
{
|
||||
lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98;
|
||||
x_89 = l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___spec__1___closed__8;
|
||||
x_89 = l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___spec__1___closed__6;
|
||||
x_90 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_90, 0, x_76);
|
||||
lean_ctor_set(x_90, 1, x_89);
|
||||
|
|
@ -9449,10 +9431,6 @@ l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_
|
|||
lean_mark_persistent(l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___spec__1___closed__9);
|
||||
l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___spec__1___closed__10 = _init_l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___spec__1___closed__10();
|
||||
lean_mark_persistent(l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___spec__1___closed__10);
|
||||
l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___spec__1___closed__11 = _init_l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___spec__1___closed__11();
|
||||
lean_mark_persistent(l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___spec__1___closed__11);
|
||||
l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___spec__1___closed__12 = _init_l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___spec__1___closed__12();
|
||||
lean_mark_persistent(l_Std_Range_forIn_loop___at___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___spec__1___closed__12);
|
||||
l___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___lambda__1___closed__1 = _init_l___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___lambda__1___closed__1();
|
||||
lean_mark_persistent(l___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___lambda__1___closed__1);
|
||||
l___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___lambda__1___closed__2 = _init_l___private_Lean_Elab_Deriving_Inhabited_0__Lean_Elab_mkInhabitedInstanceUsing_mkInstanceCmd_x3f___lambda__1___closed__2();
|
||||
|
|
|
|||
2323
stage0/stdlib/Lean/Elab/Deriving/Util.c
generated
2323
stage0/stdlib/Lean/Elab/Deriving/Util.c
generated
File diff suppressed because it is too large
Load diff
26
stage0/stdlib/Lean/Elab/Inductive.c
generated
26
stage0/stdlib/Lean/Elab/Inductive.c
generated
|
|
@ -16,7 +16,7 @@ extern "C" {
|
|||
lean_object* l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_checkParamsAndResultType_match__1___rarg(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_List_reverse___rarg(lean_object*);
|
||||
lean_object* l_Lean_Elab_Command_checkValidInductiveModifier___rarg___closed__3;
|
||||
extern lean_object* l_Lean_Meta_forallTelescopeCompatibleAux___rarg___lambda__4___closed__4;
|
||||
lean_object* l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_checkParamsAndResultType___lambda__1___closed__4;
|
||||
lean_object* l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_elabCtors(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
extern lean_object* l_myMacro____x40_Init_Notation___hyg_5846____closed__4;
|
||||
lean_object* l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_elabHeaderAux___lambda__2___closed__1;
|
||||
|
|
@ -382,6 +382,7 @@ lean_object* l_Lean_Elab_Command_elabInductiveViews___lambda__2(lean_object*, le
|
|||
uint8_t lean_expr_eqv(lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_updateResultingUniverse___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_mkIndFVar2Const___boxed(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_checkParamsAndResultType___lambda__1___closed__3;
|
||||
lean_object* l_List_mapM___at___private_Lean_Elab_Inductive_0__Lean_Elab_Command_elabCtors___spec__2___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
uint8_t lean_nat_dec_le(lean_object*, lean_object*);
|
||||
lean_object* l_List_mapM___at___private_Lean_Elab_Inductive_0__Lean_Elab_Command_replaceIndFVarsWithConsts___spec__3___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -2856,6 +2857,23 @@ x_2 = l_Lean_stringToMessageData(x_1);
|
|||
return x_2;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_checkParamsAndResultType___lambda__1___closed__3() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_mk_string("\nexpected type");
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_checkParamsAndResultType___lambda__1___closed__4() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2;
|
||||
x_1 = l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_checkParamsAndResultType___lambda__1___closed__3;
|
||||
x_2 = l_Lean_stringToMessageData(x_1);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
lean_object* l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_checkParamsAndResultType___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) {
|
||||
_start:
|
||||
{
|
||||
|
|
@ -2887,7 +2905,7 @@ x_16 = l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_checkParamsAndResult
|
|||
x_17 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_17, 0, x_16);
|
||||
lean_ctor_set(x_17, 1, x_15);
|
||||
x_18 = l_Lean_Meta_forallTelescopeCompatibleAux___rarg___lambda__4___closed__4;
|
||||
x_18 = l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_checkParamsAndResultType___lambda__1___closed__4;
|
||||
x_19 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_19, 0, x_17);
|
||||
lean_ctor_set(x_19, 1, x_18);
|
||||
|
|
@ -17097,6 +17115,10 @@ l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_checkParamsAndResultType___
|
|||
lean_mark_persistent(l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_checkParamsAndResultType___lambda__1___closed__1);
|
||||
l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_checkParamsAndResultType___lambda__1___closed__2 = _init_l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_checkParamsAndResultType___lambda__1___closed__2();
|
||||
lean_mark_persistent(l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_checkParamsAndResultType___lambda__1___closed__2);
|
||||
l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_checkParamsAndResultType___lambda__1___closed__3 = _init_l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_checkParamsAndResultType___lambda__1___closed__3();
|
||||
lean_mark_persistent(l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_checkParamsAndResultType___lambda__1___closed__3);
|
||||
l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_checkParamsAndResultType___lambda__1___closed__4 = _init_l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_checkParamsAndResultType___lambda__1___closed__4();
|
||||
lean_mark_persistent(l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_checkParamsAndResultType___lambda__1___closed__4);
|
||||
l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_checkParamsAndResultType___closed__1 = _init_l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_checkParamsAndResultType___closed__1();
|
||||
lean_mark_persistent(l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_checkParamsAndResultType___closed__1);
|
||||
l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_checkParamsAndResultType___closed__2 = _init_l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_checkParamsAndResultType___closed__2();
|
||||
|
|
|
|||
271
stage0/stdlib/Lean/Elab/Tactic/Induction.c
generated
271
stage0/stdlib/Lean/Elab/Tactic/Induction.c
generated
|
|
@ -31,7 +31,7 @@ lean_object* lean_erase_macro_scopes(lean_object*);
|
|||
lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_Tactic_evalInduction___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Elab_Tactic_Induction_0__Lean_Elab_Tactic_checkCasesResult_loop___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Elab_Tactic_Induction_0__Lean_Elab_Tactic_ElimApp_getAltNumFields___spec__2___closed__1;
|
||||
lean_object* l_Lean_Elab_Tactic_initFn____x40_Lean_Elab_Tactic_Induction___hyg_4438_(lean_object*);
|
||||
lean_object* l_Lean_Elab_Tactic_initFn____x40_Lean_Elab_Tactic_Induction___hyg_4437_(lean_object*);
|
||||
lean_object* l_Lean_stringToMessageData(lean_object*);
|
||||
lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_Tactic_ElimApp_evalAlts___spec__6___lambda__1___closed__5;
|
||||
lean_object* l___private_Lean_Elab_Tactic_Induction_0__Lean_Elab_Tactic_getGeneralizingFVarIds___lambda__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -211,7 +211,6 @@ lean_object* l_Lean_Meta_intro1Core(lean_object*, uint8_t, lean_object*, lean_ob
|
|||
lean_object* l___private_Lean_Elab_Tactic_Induction_0__Lean_Elab_Tactic_getRecFromUsingLoop___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_ReaderT_pure___at___private_Lean_Elab_Tactic_Induction_0__Lean_Elab_Tactic_ElimApp_getAltNumFields___spec__1___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Elab_Tactic_Induction_0__Lean_Elab_Tactic_getRecInfoDefault_match__4(lean_object*);
|
||||
lean_object* l_Lean_Elab_Tactic_ElimApp_setMotiveArg___closed__4;
|
||||
lean_object* l_Lean_Elab_Tactic_ElimApp_evalAlts_match__8___rarg(lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Elab_Tactic_Induction_0__Lean_Elab_Tactic_getRecFromUsingLoop___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Elab_Tactic_Induction_0__Lean_Elab_Tactic_ElimApp_getAltNumFields_match__2(lean_object*);
|
||||
|
|
@ -241,6 +240,7 @@ uint8_t l_Array_anyMUnsafe_any___at___private_Lean_Elab_Tactic_Induction_0__Lean
|
|||
lean_object* l_Lean_throwUnknownConstant___at_Lean_Elab_Tactic_getRecFromUsing___spec__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Elab_Tactic_Induction_0__Lean_Elab_Tactic_getRecInfo___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Tactic_evalInduction_match__2(lean_object*);
|
||||
lean_object* l_Lean_Meta_mkHasTypeButIsExpectedMsg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_tryClear(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_throwError___at_Lean_Elab_Tactic_getRecFromUsing___spec__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Meta_WHNF_0__Lean_Meta_whnfEasyCases___at_Lean_Meta_whnfCore___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -367,12 +367,12 @@ lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_Tactic_evalCasesUsing___spec_
|
|||
lean_object* l_Lean_throwErrorAt___at___private_Lean_Elab_Tactic_Induction_0__Lean_Elab_Tactic_ElimApp_checkAltNames___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Tactic_ElimApp_mkElimApp_loop(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Tactic_evalCasesUsing___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Tactic_initFn____x40_Lean_Elab_Tactic_Induction___hyg_4438____closed__1;
|
||||
lean_object* l_Lean_Elab_Tactic_ElimApp_mkElimApp_loop___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_List_forIn_loop___at___private_Lean_Elab_Tactic_Induction_0__Lean_Elab_Tactic_getRecInfoDefault___spec__1___closed__1;
|
||||
extern lean_object* l_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_524____closed__4;
|
||||
lean_object* l___private_Lean_Elab_Tactic_Induction_0__Lean_Elab_Tactic_ElimApp_getAltNumFields___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Elab_Tactic_Induction_0__Lean_Elab_Tactic_ElimApp_getBindingName(lean_object*);
|
||||
lean_object* l_Lean_Elab_Tactic_initFn____x40_Lean_Elab_Tactic_Induction___hyg_4437____closed__1;
|
||||
lean_object* l_Lean_Elab_Tactic_evalInduction___lambda__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_mkConst(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_resolveGlobalConst___at_Lean_Elab_Tactic_getRecFromUsing___spec__2___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -423,6 +423,7 @@ lean_object* l_Array_anyMUnsafe_any___at___private_Lean_Elab_Tactic_Induction_0_
|
|||
lean_object* l___private_Lean_Elab_Tactic_Induction_0__Lean_Elab_Tactic_getRecFromUsingLoop_match__2___rarg(lean_object*, lean_object*, lean_object*);
|
||||
extern lean_object* l_Lean_resolveGlobalConstNoOverload___rarg___lambda__1___closed__2;
|
||||
lean_object* l___private_Lean_Elab_Tactic_Induction_0__Lean_Elab_Tactic_getRecInfo_match__2___rarg(lean_object*, lean_object*, lean_object*);
|
||||
extern lean_object* l_Array_foldlMUnsafe_fold___at_Lean_withNestedTraces___spec__5___closed__1;
|
||||
lean_object* l_Lean_Expr_bindingName_x21(lean_object*);
|
||||
lean_object* l_List_forIn_loop___at___private_Lean_Elab_Tactic_Induction_0__Lean_Elab_Tactic_getRecInfoDefault___spec__1(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Tactic_evalCasesOn___closed__2;
|
||||
|
|
@ -455,7 +456,6 @@ lean_object* l_Lean_Elab_Tactic_evalAlt___boxed(lean_object*, lean_object*, lean
|
|||
uint8_t l_Lean_Name_isSuffixOf(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Tactic_saveBacktrackableState___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_throwError___at_Lean_Elab_Tactic_getRecFromUsing___spec__6(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Tactic_ElimApp_setMotiveArg___closed__3;
|
||||
lean_object* l_Lean_Elab_Tactic_evalInduction(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Tactic_setGoals(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_Tactic_evalCasesOn___spec__3___boxed(lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -604,7 +604,6 @@ lean_object* l_Lean_Elab_Tactic_elabTerm___boxed(lean_object*, lean_object*, lea
|
|||
lean_object* l___private_Lean_Elab_Tactic_Induction_0__Lean_Elab_Tactic_processResult_match__1(lean_object*);
|
||||
lean_object* l_Lean_Elab_Tactic_ElimApp_evalAlts_match__3___rarg(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_throwErrorAt___at_Lean_Elab_Tactic_ElimApp_evalAlts___spec__7(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
extern lean_object* l_Lean_Meta_throwLetTypeMismatchMessage___rarg___closed__8;
|
||||
lean_object* l_Lean_Elab_Tactic_ElimApp_evalAlts_match__9___rarg(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Tactic_liftMetaTacticAux___rarg___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
extern lean_object* l_Array_findSomeM_x3f___rarg___closed__1;
|
||||
|
|
@ -3164,23 +3163,6 @@ x_2 = l_Lean_stringToMessageData(x_1);
|
|||
return x_2;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Elab_Tactic_ElimApp_setMotiveArg___closed__3() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_mk_string("\nexpected type");
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Elab_Tactic_ElimApp_setMotiveArg___closed__4() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2;
|
||||
x_1 = l_Lean_Elab_Tactic_ElimApp_setMotiveArg___closed__3;
|
||||
x_2 = l_Lean_stringToMessageData(x_1);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Elab_Tactic_ElimApp_setMotiveArg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) {
|
||||
_start:
|
||||
{
|
||||
|
|
@ -3261,79 +3243,80 @@ x_31 = lean_unbox(x_30);
|
|||
lean_dec(x_30);
|
||||
if (x_31 == 0)
|
||||
{
|
||||
lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; uint8_t x_47;
|
||||
lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; uint8_t x_45;
|
||||
lean_dec(x_2);
|
||||
x_32 = lean_ctor_get(x_29, 1);
|
||||
lean_inc(x_32);
|
||||
lean_dec(x_29);
|
||||
x_33 = l_Lean_indentExpr(x_20);
|
||||
x_34 = l_Lean_Elab_Tactic_ElimApp_setMotiveArg___closed__2;
|
||||
x_35 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_35, 0, x_34);
|
||||
lean_ctor_set(x_35, 1, x_33);
|
||||
x_36 = l_Lean_Meta_throwLetTypeMismatchMessage___rarg___closed__8;
|
||||
x_37 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_37, 0, x_35);
|
||||
lean_ctor_set(x_37, 1, x_36);
|
||||
x_38 = l_Lean_indentExpr(x_23);
|
||||
x_39 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_39, 0, x_37);
|
||||
lean_ctor_set(x_39, 1, x_38);
|
||||
x_40 = l_Lean_Elab_Tactic_ElimApp_setMotiveArg___closed__4;
|
||||
lean_inc(x_7);
|
||||
lean_inc(x_6);
|
||||
lean_inc(x_5);
|
||||
lean_inc(x_4);
|
||||
x_33 = l_Lean_Meta_mkHasTypeButIsExpectedMsg(x_23, x_27, x_4, x_5, x_6, x_7, x_32);
|
||||
x_34 = lean_ctor_get(x_33, 0);
|
||||
lean_inc(x_34);
|
||||
x_35 = lean_ctor_get(x_33, 1);
|
||||
lean_inc(x_35);
|
||||
lean_dec(x_33);
|
||||
x_36 = l_Lean_indentExpr(x_20);
|
||||
x_37 = l_Lean_Elab_Tactic_ElimApp_setMotiveArg___closed__2;
|
||||
x_38 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_38, 0, x_37);
|
||||
lean_ctor_set(x_38, 1, x_36);
|
||||
x_39 = l_Array_foldlMUnsafe_fold___at_Lean_withNestedTraces___spec__5___closed__1;
|
||||
x_40 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_40, 0, x_38);
|
||||
lean_ctor_set(x_40, 1, x_39);
|
||||
x_41 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_41, 0, x_39);
|
||||
lean_ctor_set(x_41, 1, x_40);
|
||||
x_42 = l_Lean_indentExpr(x_27);
|
||||
lean_ctor_set(x_41, 0, x_40);
|
||||
lean_ctor_set(x_41, 1, x_34);
|
||||
x_42 = l_Lean_KernelException_toMessageData___closed__15;
|
||||
x_43 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_43, 0, x_41);
|
||||
lean_ctor_set(x_43, 1, x_42);
|
||||
x_44 = l_Lean_KernelException_toMessageData___closed__15;
|
||||
x_45 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_45, 0, x_43);
|
||||
lean_ctor_set(x_45, 1, x_44);
|
||||
x_46 = l_Lean_throwError___at_Lean_Meta_whnf___spec__1(x_45, x_4, x_5, x_6, x_7, x_32);
|
||||
x_44 = l_Lean_throwError___at_Lean_Meta_whnf___spec__1(x_43, x_4, x_5, x_6, x_7, x_35);
|
||||
lean_dec(x_7);
|
||||
lean_dec(x_6);
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_4);
|
||||
x_47 = !lean_is_exclusive(x_46);
|
||||
if (x_47 == 0)
|
||||
x_45 = !lean_is_exclusive(x_44);
|
||||
if (x_45 == 0)
|
||||
{
|
||||
return x_46;
|
||||
return x_44;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_48; lean_object* x_49; lean_object* x_50;
|
||||
x_48 = lean_ctor_get(x_46, 0);
|
||||
x_49 = lean_ctor_get(x_46, 1);
|
||||
lean_object* x_46; lean_object* x_47; lean_object* x_48;
|
||||
x_46 = lean_ctor_get(x_44, 0);
|
||||
x_47 = lean_ctor_get(x_44, 1);
|
||||
lean_inc(x_47);
|
||||
lean_inc(x_46);
|
||||
lean_dec(x_44);
|
||||
x_48 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_48, 0, x_46);
|
||||
lean_ctor_set(x_48, 1, x_47);
|
||||
return x_48;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_49; lean_object* x_50;
|
||||
lean_dec(x_27);
|
||||
lean_dec(x_23);
|
||||
x_49 = lean_ctor_get(x_29, 1);
|
||||
lean_inc(x_49);
|
||||
lean_inc(x_48);
|
||||
lean_dec(x_46);
|
||||
x_50 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_50, 0, x_48);
|
||||
lean_ctor_set(x_50, 1, x_49);
|
||||
lean_dec(x_29);
|
||||
x_50 = l_Lean_Meta_assignExprMVar(x_2, x_20, x_4, x_5, x_6, x_7, x_49);
|
||||
lean_dec(x_7);
|
||||
lean_dec(x_6);
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_4);
|
||||
return x_50;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_51; lean_object* x_52;
|
||||
lean_dec(x_27);
|
||||
lean_dec(x_23);
|
||||
x_51 = lean_ctor_get(x_29, 1);
|
||||
lean_inc(x_51);
|
||||
lean_dec(x_29);
|
||||
x_52 = l_Lean_Meta_assignExprMVar(x_2, x_20, x_4, x_5, x_6, x_7, x_51);
|
||||
lean_dec(x_7);
|
||||
lean_dec(x_6);
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_4);
|
||||
return x_52;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_53;
|
||||
uint8_t x_51;
|
||||
lean_dec(x_27);
|
||||
lean_dec(x_23);
|
||||
lean_dec(x_20);
|
||||
|
|
@ -3342,29 +3325,29 @@ lean_dec(x_6);
|
|||
lean_dec(x_5);
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_2);
|
||||
x_53 = !lean_is_exclusive(x_29);
|
||||
if (x_53 == 0)
|
||||
x_51 = !lean_is_exclusive(x_29);
|
||||
if (x_51 == 0)
|
||||
{
|
||||
return x_29;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_54; lean_object* x_55; lean_object* x_56;
|
||||
x_54 = lean_ctor_get(x_29, 0);
|
||||
x_55 = lean_ctor_get(x_29, 1);
|
||||
lean_inc(x_55);
|
||||
lean_inc(x_54);
|
||||
lean_object* x_52; lean_object* x_53; lean_object* x_54;
|
||||
x_52 = lean_ctor_get(x_29, 0);
|
||||
x_53 = lean_ctor_get(x_29, 1);
|
||||
lean_inc(x_53);
|
||||
lean_inc(x_52);
|
||||
lean_dec(x_29);
|
||||
x_56 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_56, 0, x_54);
|
||||
lean_ctor_set(x_56, 1, x_55);
|
||||
return x_56;
|
||||
x_54 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_54, 0, x_52);
|
||||
lean_ctor_set(x_54, 1, x_53);
|
||||
return x_54;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_57;
|
||||
uint8_t x_55;
|
||||
lean_dec(x_23);
|
||||
lean_dec(x_20);
|
||||
lean_dec(x_7);
|
||||
|
|
@ -3372,109 +3355,109 @@ lean_dec(x_6);
|
|||
lean_dec(x_5);
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_2);
|
||||
x_57 = !lean_is_exclusive(x_26);
|
||||
if (x_57 == 0)
|
||||
x_55 = !lean_is_exclusive(x_26);
|
||||
if (x_55 == 0)
|
||||
{
|
||||
return x_26;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_58; lean_object* x_59; lean_object* x_60;
|
||||
x_58 = lean_ctor_get(x_26, 0);
|
||||
x_59 = lean_ctor_get(x_26, 1);
|
||||
lean_inc(x_59);
|
||||
lean_inc(x_58);
|
||||
lean_object* x_56; lean_object* x_57; lean_object* x_58;
|
||||
x_56 = lean_ctor_get(x_26, 0);
|
||||
x_57 = lean_ctor_get(x_26, 1);
|
||||
lean_inc(x_57);
|
||||
lean_inc(x_56);
|
||||
lean_dec(x_26);
|
||||
x_60 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_60, 0, x_58);
|
||||
lean_ctor_set(x_60, 1, x_59);
|
||||
return x_60;
|
||||
x_58 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_58, 0, x_56);
|
||||
lean_ctor_set(x_58, 1, x_57);
|
||||
return x_58;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_61;
|
||||
uint8_t x_59;
|
||||
lean_dec(x_20);
|
||||
lean_dec(x_7);
|
||||
lean_dec(x_6);
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_2);
|
||||
x_61 = !lean_is_exclusive(x_22);
|
||||
if (x_61 == 0)
|
||||
x_59 = !lean_is_exclusive(x_22);
|
||||
if (x_59 == 0)
|
||||
{
|
||||
return x_22;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_62; lean_object* x_63; lean_object* x_64;
|
||||
x_62 = lean_ctor_get(x_22, 0);
|
||||
x_63 = lean_ctor_get(x_22, 1);
|
||||
lean_inc(x_63);
|
||||
lean_inc(x_62);
|
||||
lean_object* x_60; lean_object* x_61; lean_object* x_62;
|
||||
x_60 = lean_ctor_get(x_22, 0);
|
||||
x_61 = lean_ctor_get(x_22, 1);
|
||||
lean_inc(x_61);
|
||||
lean_inc(x_60);
|
||||
lean_dec(x_22);
|
||||
x_64 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_64, 0, x_62);
|
||||
lean_ctor_set(x_64, 1, x_63);
|
||||
return x_64;
|
||||
x_62 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_62, 0, x_60);
|
||||
lean_ctor_set(x_62, 1, x_61);
|
||||
return x_62;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_65;
|
||||
uint8_t x_63;
|
||||
lean_dec(x_7);
|
||||
lean_dec(x_6);
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_2);
|
||||
x_65 = !lean_is_exclusive(x_19);
|
||||
if (x_65 == 0)
|
||||
x_63 = !lean_is_exclusive(x_19);
|
||||
if (x_63 == 0)
|
||||
{
|
||||
return x_19;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_66; lean_object* x_67; lean_object* x_68;
|
||||
x_66 = lean_ctor_get(x_19, 0);
|
||||
x_67 = lean_ctor_get(x_19, 1);
|
||||
lean_inc(x_67);
|
||||
lean_inc(x_66);
|
||||
lean_object* x_64; lean_object* x_65; lean_object* x_66;
|
||||
x_64 = lean_ctor_get(x_19, 0);
|
||||
x_65 = lean_ctor_get(x_19, 1);
|
||||
lean_inc(x_65);
|
||||
lean_inc(x_64);
|
||||
lean_dec(x_19);
|
||||
x_68 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_68, 0, x_66);
|
||||
lean_ctor_set(x_68, 1, x_67);
|
||||
return x_68;
|
||||
x_66 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_66, 0, x_64);
|
||||
lean_ctor_set(x_66, 1, x_65);
|
||||
return x_66;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_69;
|
||||
uint8_t x_67;
|
||||
lean_dec(x_7);
|
||||
lean_dec(x_6);
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_3);
|
||||
lean_dec(x_2);
|
||||
x_69 = !lean_is_exclusive(x_10);
|
||||
if (x_69 == 0)
|
||||
x_67 = !lean_is_exclusive(x_10);
|
||||
if (x_67 == 0)
|
||||
{
|
||||
return x_10;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_70; lean_object* x_71; lean_object* x_72;
|
||||
x_70 = lean_ctor_get(x_10, 0);
|
||||
x_71 = lean_ctor_get(x_10, 1);
|
||||
lean_inc(x_71);
|
||||
lean_inc(x_70);
|
||||
lean_object* x_68; lean_object* x_69; lean_object* x_70;
|
||||
x_68 = lean_ctor_get(x_10, 0);
|
||||
x_69 = lean_ctor_get(x_10, 1);
|
||||
lean_inc(x_69);
|
||||
lean_inc(x_68);
|
||||
lean_dec(x_10);
|
||||
x_72 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_72, 0, x_70);
|
||||
lean_ctor_set(x_72, 1, x_71);
|
||||
return x_72;
|
||||
x_70 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_70, 0, x_68);
|
||||
lean_ctor_set(x_70, 1, x_69);
|
||||
return x_70;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -17430,7 +17413,7 @@ x_15 = l_Array_mapMUnsafe_map___at_Lean_Elab_Tactic_elabTargets___spec__1(x_13,
|
|||
return x_15;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Elab_Tactic_initFn____x40_Lean_Elab_Tactic_Induction___hyg_4438____closed__1() {
|
||||
static lean_object* _init_l_Lean_Elab_Tactic_initFn____x40_Lean_Elab_Tactic_Induction___hyg_4437____closed__1() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3;
|
||||
|
|
@ -17440,11 +17423,11 @@ x_3 = lean_name_mk_string(x_1, x_2);
|
|||
return x_3;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Elab_Tactic_initFn____x40_Lean_Elab_Tactic_Induction___hyg_4438_(lean_object* x_1) {
|
||||
lean_object* l_Lean_Elab_Tactic_initFn____x40_Lean_Elab_Tactic_Induction___hyg_4437_(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_2; lean_object* x_3;
|
||||
x_2 = l_Lean_Elab_Tactic_initFn____x40_Lean_Elab_Tactic_Induction___hyg_4438____closed__1;
|
||||
x_2 = l_Lean_Elab_Tactic_initFn____x40_Lean_Elab_Tactic_Induction___hyg_4437____closed__1;
|
||||
x_3 = l_Lean_registerTraceClass(x_2, x_1);
|
||||
return x_3;
|
||||
}
|
||||
|
|
@ -17879,7 +17862,7 @@ lean_object* x_110; lean_object* x_111; lean_object* x_112; lean_object* x_113;
|
|||
x_110 = lean_ctor_get(x_105, 1);
|
||||
lean_inc(x_110);
|
||||
lean_dec(x_105);
|
||||
x_111 = l_Lean_Elab_Tactic_initFn____x40_Lean_Elab_Tactic_Induction___hyg_4438____closed__1;
|
||||
x_111 = l_Lean_Elab_Tactic_initFn____x40_Lean_Elab_Tactic_Induction___hyg_4437____closed__1;
|
||||
x_112 = l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at___private_Lean_Elab_Tactic_Induction_0__Lean_Elab_Tactic_checkAltCtorNames___spec__3(x_111, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_110);
|
||||
x_113 = lean_ctor_get(x_112, 0);
|
||||
lean_inc(x_113);
|
||||
|
|
@ -18004,7 +17987,7 @@ x_66 = l_Lean_KernelException_toMessageData___closed__15;
|
|||
x_67 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_67, 0, x_65);
|
||||
lean_ctor_set(x_67, 1, x_66);
|
||||
x_68 = l_Lean_Elab_Tactic_initFn____x40_Lean_Elab_Tactic_Induction___hyg_4438____closed__1;
|
||||
x_68 = l_Lean_Elab_Tactic_initFn____x40_Lean_Elab_Tactic_Induction___hyg_4437____closed__1;
|
||||
x_69 = l_Lean_addTrace___at___private_Lean_Elab_Tactic_Induction_0__Lean_Elab_Tactic_checkAltCtorNames___spec__2(x_68, x_67, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_58);
|
||||
x_70 = lean_ctor_get(x_69, 1);
|
||||
lean_inc(x_70);
|
||||
|
|
@ -18040,7 +18023,7 @@ lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean
|
|||
x_78 = lean_ctor_get(x_73, 1);
|
||||
lean_inc(x_78);
|
||||
lean_dec(x_73);
|
||||
x_79 = l_Lean_Elab_Tactic_initFn____x40_Lean_Elab_Tactic_Induction___hyg_4438____closed__1;
|
||||
x_79 = l_Lean_Elab_Tactic_initFn____x40_Lean_Elab_Tactic_Induction___hyg_4437____closed__1;
|
||||
x_80 = l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at___private_Lean_Elab_Tactic_Induction_0__Lean_Elab_Tactic_checkAltCtorNames___spec__3(x_79, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_78);
|
||||
x_81 = lean_ctor_get(x_80, 0);
|
||||
lean_inc(x_81);
|
||||
|
|
@ -18090,7 +18073,7 @@ x_99 = l_Lean_KernelException_toMessageData___closed__15;
|
|||
x_100 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_100, 0, x_98);
|
||||
lean_ctor_set(x_100, 1, x_99);
|
||||
x_101 = l_Lean_Elab_Tactic_initFn____x40_Lean_Elab_Tactic_Induction___hyg_4438____closed__1;
|
||||
x_101 = l_Lean_Elab_Tactic_initFn____x40_Lean_Elab_Tactic_Induction___hyg_4437____closed__1;
|
||||
x_102 = l_Lean_addTrace___at___private_Lean_Elab_Tactic_Induction_0__Lean_Elab_Tactic_checkAltCtorNames___spec__2(x_101, x_100, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_86);
|
||||
x_103 = lean_ctor_get(x_102, 1);
|
||||
lean_inc(x_103);
|
||||
|
|
@ -19218,10 +19201,6 @@ l_Lean_Elab_Tactic_ElimApp_setMotiveArg___closed__1 = _init_l_Lean_Elab_Tactic_E
|
|||
lean_mark_persistent(l_Lean_Elab_Tactic_ElimApp_setMotiveArg___closed__1);
|
||||
l_Lean_Elab_Tactic_ElimApp_setMotiveArg___closed__2 = _init_l_Lean_Elab_Tactic_ElimApp_setMotiveArg___closed__2();
|
||||
lean_mark_persistent(l_Lean_Elab_Tactic_ElimApp_setMotiveArg___closed__2);
|
||||
l_Lean_Elab_Tactic_ElimApp_setMotiveArg___closed__3 = _init_l_Lean_Elab_Tactic_ElimApp_setMotiveArg___closed__3();
|
||||
lean_mark_persistent(l_Lean_Elab_Tactic_ElimApp_setMotiveArg___closed__3);
|
||||
l_Lean_Elab_Tactic_ElimApp_setMotiveArg___closed__4 = _init_l_Lean_Elab_Tactic_ElimApp_setMotiveArg___closed__4();
|
||||
lean_mark_persistent(l_Lean_Elab_Tactic_ElimApp_setMotiveArg___closed__4);
|
||||
l_Array_forInUnsafe_loop___at___private_Lean_Elab_Tactic_Induction_0__Lean_Elab_Tactic_ElimApp_getAltNumFields___spec__2___closed__1 = _init_l_Array_forInUnsafe_loop___at___private_Lean_Elab_Tactic_Induction_0__Lean_Elab_Tactic_ElimApp_getAltNumFields___spec__2___closed__1();
|
||||
lean_mark_persistent(l_Array_forInUnsafe_loop___at___private_Lean_Elab_Tactic_Induction_0__Lean_Elab_Tactic_ElimApp_getAltNumFields___spec__2___closed__1);
|
||||
l___private_Lean_Elab_Tactic_Induction_0__Lean_Elab_Tactic_ElimApp_getAltNumFields___lambda__1___closed__1 = _init_l___private_Lean_Elab_Tactic_Induction_0__Lean_Elab_Tactic_ElimApp_getAltNumFields___lambda__1___closed__1();
|
||||
|
|
@ -19349,9 +19328,9 @@ l___private_Lean_Elab_Tactic_Induction_0__Lean_Elab_Tactic_elabTaggedTerm___lamb
|
|||
lean_mark_persistent(l___private_Lean_Elab_Tactic_Induction_0__Lean_Elab_Tactic_elabTaggedTerm___lambda__1___closed__3);
|
||||
l_Lean_Elab_Tactic_elabTargets___boxed__const__1 = _init_l_Lean_Elab_Tactic_elabTargets___boxed__const__1();
|
||||
lean_mark_persistent(l_Lean_Elab_Tactic_elabTargets___boxed__const__1);
|
||||
l_Lean_Elab_Tactic_initFn____x40_Lean_Elab_Tactic_Induction___hyg_4438____closed__1 = _init_l_Lean_Elab_Tactic_initFn____x40_Lean_Elab_Tactic_Induction___hyg_4438____closed__1();
|
||||
lean_mark_persistent(l_Lean_Elab_Tactic_initFn____x40_Lean_Elab_Tactic_Induction___hyg_4438____closed__1);
|
||||
res = l_Lean_Elab_Tactic_initFn____x40_Lean_Elab_Tactic_Induction___hyg_4438_(lean_io_mk_world());
|
||||
l_Lean_Elab_Tactic_initFn____x40_Lean_Elab_Tactic_Induction___hyg_4437____closed__1 = _init_l_Lean_Elab_Tactic_initFn____x40_Lean_Elab_Tactic_Induction___hyg_4437____closed__1();
|
||||
lean_mark_persistent(l_Lean_Elab_Tactic_initFn____x40_Lean_Elab_Tactic_Induction___hyg_4437____closed__1);
|
||||
res = l_Lean_Elab_Tactic_initFn____x40_Lean_Elab_Tactic_Induction___hyg_4437_(lean_io_mk_world());
|
||||
if (lean_io_result_is_error(res)) return res;
|
||||
lean_dec_ref(res);
|
||||
l_Lean_Elab_Tactic_evalCasesOn___closed__1 = _init_l_Lean_Elab_Tactic_evalCasesOn___closed__1();
|
||||
|
|
|
|||
422
stage0/stdlib/Lean/Elab/Term.c
generated
422
stage0/stdlib/Lean/Elab/Term.c
generated
|
|
@ -80,7 +80,6 @@ lean_object* l_Std_RBNode_insert___at_Lean_NameSet_insert___spec__1(lean_object*
|
|||
lean_object* l_List_foldl___at_Lean_Elab_addMacroStack___spec__1(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_getLetRecsToLift___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_instMonadMacroAdapterTermElabM___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1036____closed__1;
|
||||
extern lean_object* l_Lean_withIncRecDepth___rarg___lambda__2___closed__2;
|
||||
lean_object* l___private_Lean_Elab_Term_0__Lean_Elab_Term_tryLiftAndCoe___closed__9;
|
||||
extern lean_object* l_Lean_nullKind;
|
||||
|
|
@ -92,6 +91,7 @@ lean_object* l___private_Lean_Elab_Term_0__Lean_Elab_Term_exceptionToSorry_match
|
|||
extern lean_object* l_term_x5b___x5d___closed__9;
|
||||
lean_object* l_Lean_Elab_Term_resolveName___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___regBuiltin_Lean_Elab_Term_elabProp___closed__3;
|
||||
lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1035____closed__1;
|
||||
lean_object* l_List_toString___at_Lean_resolveGlobalConstNoOverload___spec__2(lean_object*);
|
||||
extern lean_object* l_myMacro____x40_Init_Notation___hyg_2022____closed__4;
|
||||
lean_object* l___private_Lean_Elab_Term_0__Lean_Elab_Term_exceptionToSorry___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -139,8 +139,8 @@ lean_object* l_Lean_Elab_log___at___private_Lean_Elab_Term_0__Lean_Elab_Term_exc
|
|||
lean_object* l___regBuiltin_Lean_Elab_Term_elabEnsureTypeOf___closed__1;
|
||||
lean_object* l_Lean_Elab_Term_elabNumLit___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___regBuiltin_Lean_Elab_Term_elabTypeStx___closed__3;
|
||||
lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1036____closed__4;
|
||||
lean_object* l___private_Lean_Elab_Term_0__Lean_Elab_Term_mkFreshTypeMVarFor___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1035____closed__4;
|
||||
lean_object* l_Lean_Elab_Term_registerCustomErrorIfMVar_match__1___rarg(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_mkTermElabAttributeUnsafe___closed__1;
|
||||
lean_object* l_Lean_Elab_throwIllFormedSyntax___at_Lean_Elab_Term_elabNumLit___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -242,10 +242,10 @@ lean_object* l_List_map___at_Lean_resolveGlobalConst___spec__2(lean_object*);
|
|||
lean_object* l_Lean_Elab_Term_applyAttributesAt(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___regBuiltin_Lean_Elab_Term_elabDoubleQuotedName___closed__1;
|
||||
lean_object* l_ReaderT_bind___at_Lean_Meta_instMonadLCtxMetaM___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2430____closed__3;
|
||||
lean_object* l_Lean_Elab_Term_instInhabitedTermElabResult___closed__1;
|
||||
extern lean_object* l_Lean_Expr_getAppArgs___closed__1;
|
||||
lean_object* l_Lean_Elab_Term_registerCustomErrorIfMVar___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
extern lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_CheckAssignment_addAssignmentInfo___rarg___closed__3;
|
||||
lean_object* l_Lean_Elab_Term_instMonadMacroAdapterTermElabM___closed__3;
|
||||
lean_object* l_Lean_Elab_Term_elabTypeWithAutoBoundImplicit_loop_match__1___rarg(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Level_elabLevel(lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -283,7 +283,6 @@ lean_object* l_Lean_Elab_Term_getMainModule___rarg(lean_object*, lean_object*);
|
|||
lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Elab_Term_instMetaEvalTermElabM___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_instMonadMacroAdapterTermElabM___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
uint8_t l_USize_decLt(size_t, size_t);
|
||||
lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2430____closed__5;
|
||||
lean_object* l_Lean_Elab_Term_elabScientificLit___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_instMonadMacroAdapterTermElabM___closed__5;
|
||||
lean_object* l_Lean_throwError___at_Lean_Elab_Term_elabNumLit___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -299,6 +298,7 @@ lean_object* l_Lean_throwError___at_Lean_Elab_Term_elabNumLit___spec__2___boxed(
|
|||
lean_object* l___regBuiltin_Lean_Elab_Term_elabDoubleQuotedName___closed__2;
|
||||
lean_object* l_Lean_Elab_Term_elabNumLit_match__1___rarg(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_elabTypeWithAutoBoundImplicit___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2447____closed__2;
|
||||
extern lean_object* l_Lean_levelZero;
|
||||
lean_object* l_Lean_throwUnknownConstant___at_Lean_Elab_Term_elabDoubleQuotedName___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_elabStrLit___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -412,7 +412,7 @@ lean_object* l___private_Lean_Elab_Term_0__Lean_Elab_Term_tryCoeSort(lean_object
|
|||
lean_object* l_Lean_Elab_Term_TermElabM_run(lean_object*);
|
||||
uint8_t l_Array_contains___at_Lean_Elab_Term_logUnassignedUsingErrorInfos___spec__1(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_MVarErrorInfo_logError___closed__1;
|
||||
lean_object* l_Lean_Elab_Term_mkTypeMismatchError___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_mkTypeMismatchError___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_isExprMVarAssigned___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_elabProp___rarg(lean_object*);
|
||||
lean_object* l___private_Lean_Elab_Term_0__Lean_Elab_Term_elabImplicitLambdaAux___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -426,8 +426,8 @@ lean_object* l_Lean_Elab_Term_tryPostponeIfHasMVars_match__1___rarg(lean_object*
|
|||
lean_object* l___regBuiltin_Lean_Elab_Term_elabEnsureTypeOf___closed__3;
|
||||
uint8_t l_Lean_KVMap_getBool(lean_object*, lean_object*, uint8_t);
|
||||
lean_object* l_Lean_Elab_Term_synthesizeInstMVarCore___closed__3;
|
||||
lean_object* l_Lean_Meta_mkHasTypeButIsExpectedMsg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_instMetaEvalTermElabM___rarg___closed__2;
|
||||
extern lean_object* l_Lean_Meta_throwLetTypeMismatchMessage___rarg___closed__10;
|
||||
lean_object* l_Lean_Elab_Term_withMacroExpansion___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_elabByTactic___closed__2;
|
||||
lean_object* l_Lean_Elab_Term_mkExplicitBinder___closed__3;
|
||||
|
|
@ -441,6 +441,7 @@ lean_object* l___private_Lean_Elab_Term_0__Lean_Elab_Term_elabImplicitLambda(lea
|
|||
lean_object* l_Lean_Meta_mkAppOptM___at___private_Lean_Elab_Term_0__Lean_Elab_Term_tryPureCoe_x3f___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_elabQuotedName(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Elab_Term_0__Lean_Elab_Term_liftAttrM___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2447____closed__4;
|
||||
lean_object* l___private_Lean_Elab_Term_0__Lean_Elab_Term_elabTermAux___lambda__4___closed__1;
|
||||
extern lean_object* l_Lean_Meta_instMetaEvalMetaM___rarg___closed__2;
|
||||
lean_object* l___private_Lean_Elab_Term_0__Lean_Elab_Term_elabTermAux___lambda__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -455,7 +456,6 @@ uint8_t l_Lean_Expr_hasExprMVar(lean_object*);
|
|||
lean_object* l_Lean_Elab_Term_getFVarLocalDecl_x21(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_replaceRef(lean_object*, lean_object*);
|
||||
lean_object* lean_array_get(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_mkTypeMismatchError___closed__3;
|
||||
lean_object* l___private_Lean_Elab_Term_0__Lean_Elab_Term_isTypeApp_x3f___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_levelMVarToParam___lambda__1___boxed(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_withLocalDecl___at___private_Lean_Elab_Term_0__Lean_Elab_Term_elabImplicitLambda___spec__1(lean_object*);
|
||||
|
|
@ -527,14 +527,14 @@ lean_object* l_Lean_Elab_Term_mkTypeMismatchError_match__1___rarg(lean_object*,
|
|||
lean_object* l___regBuiltin_Lean_Elab_Term_elabCharLit(lean_object*);
|
||||
lean_object* l___private_Lean_Elab_Term_0__Lean_Elab_Term_elabOptLevel___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Elab_Term_0__Lean_Elab_Term_elabUsingElabFnsAux_match__2___rarg(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_5862_(lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2430_(lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_5879_(lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2447_(lean_object*);
|
||||
lean_object* l_Lean_mkAuxName___at_Lean_Elab_Term_mkAuxName___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_setElabConfig(lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_instMetaEvalTermElabM___rarg___closed__4;
|
||||
lean_object* l_Lean_Elab_Term_getLetRecsToLift(lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_liftLevelM___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1036_(lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1035_(lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_797_(lean_object*);
|
||||
lean_object* l_Std_PersistentArray_forMAux___at_Lean_Elab_Term_instMetaEvalTermElabM___spec__6(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Syntax_getId(lean_object*);
|
||||
|
|
@ -544,7 +544,7 @@ lean_object* l_Lean_Elab_addMacroStack___at_Lean_Elab_Term_instAddErrorMessageCo
|
|||
lean_object* l___private_Lean_Elab_Term_0__Lean_Elab_Term_mkFreshTypeMVarFor_match__1(lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_mkTermElabAttributeUnsafe___closed__6;
|
||||
lean_object* l_Lean_Elab_Term_elabSyntheticHole_match__2___rarg(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_mkTypeMismatchError(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_mkTypeMismatchError(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_throwPostpone___at_Lean_Elab_Term_tryPostpone___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_State_levelNames___default;
|
||||
lean_object* l_Std_PersistentHashMap_findAtAux___at___private_Lean_Elab_Term_0__Lean_Elab_Term_elabUsingElabFns___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -561,6 +561,7 @@ lean_object* l_Lean_Elab_Term_instInhabitedTermElabResult;
|
|||
lean_object* l_Lean_Elab_Term_resolveName(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Elab_Term_0__Lean_Elab_Term_tryCoe___closed__2;
|
||||
lean_object* l_Lean_Elab_Term_instMonadMacroAdapterTermElabM___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2447____closed__1;
|
||||
lean_object* l_Lean_Elab_Term_elabProp___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_instMonadLiftTMetaMTermElabM___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_getCurrMacroScope(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -607,6 +608,7 @@ lean_object* l_Lean_Elab_Term_elabProp(lean_object*, lean_object*, lean_object*,
|
|||
lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_Term_addAutoBoundImplicits___spec__4(lean_object*, lean_object*, lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_MVarErrorInfo_logError___closed__5;
|
||||
lean_object* l_Lean_LocalDecl_toExpr(lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2447____closed__5;
|
||||
extern lean_object* l_Lean_firstFrontendMacroScope;
|
||||
lean_object* l___regBuiltin_Lean_Elab_Term_elabTypeOf___closed__3;
|
||||
lean_object* l_Lean_Elab_mkElabAttribute___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -670,6 +672,7 @@ lean_object* l___private_Lean_Elab_Term_0__Lean_Elab_Term_tryLiftAndCoe___closed
|
|||
lean_object* l_Lean_Elab_Term_tryPostponeIfHasMVars___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_resolveLocalName_loop_match__2___rarg(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Elab_Term_0__Lean_Elab_Term_elabTermAux___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2447____closed__3;
|
||||
size_t l_USize_land(size_t, size_t);
|
||||
lean_object* l_Lean_Elab_Term_mkConst(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Elab_Term_0__Lean_Elab_Term_mkSomeContext___closed__2;
|
||||
|
|
@ -678,6 +681,7 @@ lean_object* l_Lean_Elab_Term_mkConst___closed__3;
|
|||
lean_object* l___private_Lean_Meta_Basic_0__Lean_Meta_withMVarContextImp___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_resolveName___closed__4;
|
||||
lean_object* l___private_Lean_Elab_Term_0__Lean_Elab_Term_tryCoe_match__2(lean_object*);
|
||||
lean_object* l_Lean_Elab_initFn____x40_Lean_Elab_Term___hyg_7640____closed__1;
|
||||
extern lean_object* l_Lean_nullKind___closed__2;
|
||||
lean_object* l_Lean_Elab_Term_instMonadLogTermElabM___lambda__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_throwUnsupportedSyntax___at___private_Lean_Elab_Term_0__Lean_Elab_Term_elabTermAux___spec__3___rarg(lean_object*);
|
||||
|
|
@ -745,6 +749,7 @@ lean_object* l___private_Lean_Elab_Term_0__Lean_Elab_Term_tryLiftAndCoe___closed
|
|||
lean_object* l___private_Lean_Elab_Term_0__Lean_Elab_Term_elabImplicitLambdaAux___closed__1;
|
||||
extern lean_object* l_Lean_resolveGlobalConstNoOverload___rarg___lambda__1___closed__2;
|
||||
lean_object* l___regBuiltin_Lean_Elab_Term_elabNumLit___closed__1;
|
||||
extern lean_object* l_Array_foldlMUnsafe_fold___at_Lean_withNestedTraces___spec__5___closed__1;
|
||||
lean_object* l_Lean_Elab_Term_isLetRecAuxMVar___closed__1;
|
||||
lean_object* l___private_Lean_Elab_Term_0__Lean_Elab_Term_elabImplicitLambdaAux___closed__2;
|
||||
lean_object* l_Lean_mkLevelSucc(lean_object*);
|
||||
|
|
@ -765,7 +770,6 @@ uint8_t l_Lean_Expr_isMVar(lean_object*);
|
|||
lean_object* l_Lean_Elab_Term_mkFreshIdent___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_Term_addAutoBoundImplicits___spec__6___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_resolveGlobalConstNoOverload___at_Lean_Elab_Term_elabDoubleQuotedName___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_initFn____x40_Lean_Elab_Term___hyg_7623____closed__1;
|
||||
lean_object* l_Lean_Elab_Term_logUnassignedUsingErrorInfos___closed__1;
|
||||
lean_object* l_Lean_Elab_Term_elabScientificLit___closed__4;
|
||||
lean_object* l_Lean_Elab_Term_resetMessageLog___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -890,7 +894,6 @@ extern lean_object* l_Lean_Meta_evalNat_visit___closed__3;
|
|||
extern lean_object* l_Lean_Meta_mkSorry___rarg___lambda__1___closed__4;
|
||||
lean_object* l_Lean_Elab_Term_tryCoeThunk_x3f___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_instMonadLogTermElabM___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2430____closed__2;
|
||||
lean_object* l_List_foldlM___at_Lean_Elab_Term_logUnassignedUsingErrorInfos___spec__5___lambda__2(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_addMessageContextFull___at_Lean_Meta_instAddMessageContextMetaM___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_synthesizeInst_match__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -903,7 +906,6 @@ lean_object* l_Lean_Elab_Term_withFreshMacroScope___rarg(lean_object*, lean_obje
|
|||
lean_object* l_Lean_Elab_Term_TermElabM_toIO_match__1(lean_object*, lean_object*);
|
||||
uint8_t l_Lean_Syntax_isNone(lean_object*);
|
||||
lean_object* l_Lean_Meta_inferType(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2430____closed__1;
|
||||
lean_object* l_Lean_Elab_Term_elabDoubleQuotedName_match__1___rarg(lean_object*, lean_object*, lean_object*);
|
||||
extern lean_object* l_Lean_Meta_mkSorry___rarg___lambda__1___closed__2;
|
||||
extern lean_object* l_Lean_instInhabitedMessageData___closed__1;
|
||||
|
|
@ -928,7 +930,6 @@ lean_object* l_Array_anyMUnsafe_any___at___private_Lean_Elab_Term_0__Lean_Elab_T
|
|||
lean_object* l_Lean_Elab_Term_liftCoreM___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
extern lean_object* l_Lean_Meta_evalNat_visit___closed__2;
|
||||
lean_object* l_Lean_Meta_instantiateMVars(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_5862____closed__1;
|
||||
extern size_t l_Std_PersistentHashMap_insertAux___rarg___closed__2;
|
||||
lean_object* l_Lean_Elab_Term_mkExplicitBinder___closed__1;
|
||||
uint8_t l___private_Lean_Elab_Term_0__Lean_Elab_Term_getAutoBoundImplicitLocalOption(lean_object*);
|
||||
|
|
@ -938,7 +939,6 @@ lean_object* l_Lean_Elab_Term_logUnassignedUsingErrorInfos(lean_object*, lean_ob
|
|||
lean_object* l___private_Lean_Elab_Term_0__Lean_Elab_Term_tryCoeSort___closed__8;
|
||||
uint8_t l_Lean_Syntax_isOfKind(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_PersistentEnvExtension_getState___rarg(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2430____closed__4;
|
||||
lean_object* l_Lean_Elab_Term_elabByTactic___closed__3;
|
||||
lean_object* l___private_Lean_Elab_Term_0__Lean_Elab_Term_useImplicitLambda_x3f(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_getLetRecsToLift___boxed(lean_object*);
|
||||
|
|
@ -985,7 +985,7 @@ lean_object* l_IO_println___at_Lean_instEval___spec__1(lean_object*, lean_object
|
|||
lean_object* l_Lean_Elab_Term_logUnassignedUsingErrorInfos_match__2___rarg(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_throwErrorIfErrors(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
uint8_t l_Lean_NameSet_contains(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_initFn____x40_Lean_Elab_Term___hyg_7623_(lean_object*);
|
||||
lean_object* l_Lean_Elab_initFn____x40_Lean_Elab_Term___hyg_7640_(lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_elabByTactic_match__1___rarg(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_addAutoBoundImplicits(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_withAutoBoundImplicitLocal___rarg(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -1090,10 +1090,9 @@ lean_object* l_Lean_Elab_Term_tryPostponeIfNoneOrMVar___boxed(lean_object*, lean
|
|||
uint8_t l_Lean_Elab_getMacroStackOption(lean_object*);
|
||||
lean_object* lean_uint32_to_nat(uint32_t);
|
||||
lean_object* l___regBuiltin_Lean_Elab_Term_elabSyntheticHole___closed__1;
|
||||
lean_object* l_Lean_Elab_Term_mkTypeMismatchError___closed__4;
|
||||
lean_object* l_Lean_Elab_Term_elabScientificLit_match__1___rarg(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1036____closed__3;
|
||||
lean_object* l_Lean_Elab_Term_elabByTactic_match__1(lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1035____closed__3;
|
||||
extern lean_object* l_Lean_Elab_initFn____x40_Lean_Elab_Util___hyg_870____closed__2;
|
||||
lean_object* l_Lean_Elab_Term_elabTypeWithAutoBoundImplicit(lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_throwTypeMismatchError___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -1103,7 +1102,6 @@ lean_object* l_Lean_Elab_Term_elabBadCDot___rarg___boxed(lean_object*, lean_obje
|
|||
lean_object* l_Lean_Elab_Term_instMetaEvalTermElabM___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_getAttributeImpl(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_mkAppOptM___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
extern lean_object* l_Lean_Meta_throwLetTypeMismatchMessage___rarg___closed__8;
|
||||
lean_object* l_Lean_throwError___at_Lean_Elab_Term_synthesizeInstMVarCore___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_saveAllState___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_MVarErrorInfo_logError___closed__8;
|
||||
|
|
@ -1130,6 +1128,7 @@ lean_object* l_Lean_Elab_Term_elabRawNatLit___boxed(lean_object*, lean_object*,
|
|||
lean_object* l_Lean_Elab_Term_isMonadApp_match__1___rarg(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Elab_Term_0__Lean_Elab_Term_tryLiftAndCoe___closed__7;
|
||||
lean_object* l_Lean_Elab_Term_elabTermWithoutImplicitLambdas___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_5879____closed__1;
|
||||
lean_object* l___private_Lean_Elab_Term_0__Lean_Elab_Term_elabUsingElabFns___closed__2;
|
||||
lean_object* l_Lean_mkApp3(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_withAutoBoundImplicitLocal___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -1157,13 +1156,13 @@ lean_object* l_Lean_Elab_Term_elabNumLit(lean_object*, lean_object*, lean_object
|
|||
uint8_t lean_nat_dec_lt(lean_object*, lean_object*);
|
||||
lean_object* l_Std_PersistentHashMap_findAtAux___at___private_Lean_Elab_Term_0__Lean_Elab_Term_elabUsingElabFns___spec__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_elabCharLit_match__1(lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1035____closed__2;
|
||||
lean_object* l___private_Lean_Elab_Term_0__Lean_Elab_Term_postponeElabTerm___closed__1;
|
||||
uint8_t l_Lean_Syntax_isIdent(lean_object*);
|
||||
lean_object* l_ReaderT_bind___at_Lean_Elab_Term_instMonadLogTermElabM___spec__2(lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Elab_Term_0__Lean_Elab_Term_elabTermAux___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
uint8_t l_Lean_Elab_Term_Context_mayPostpone___default;
|
||||
lean_object* l___regBuiltin_Lean_Elab_Term_elabTypeOf___closed__1;
|
||||
lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1036____closed__2;
|
||||
lean_object* l_Lean_Elab_Term_setElabConfig(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
|
|
@ -4388,7 +4387,7 @@ x_2 = lean_alloc_closure((void*)(l_Lean_Elab_Term_withoutErrToSorry___rarg), 8,
|
|||
return x_2;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1036____closed__1() {
|
||||
static lean_object* _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1035____closed__1() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
|
|
@ -4396,17 +4395,17 @@ x_1 = lean_mk_string("autoBoundImplicitLocal");
|
|||
return x_1;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1036____closed__2() {
|
||||
static lean_object* _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1035____closed__2() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3;
|
||||
x_1 = lean_box(0);
|
||||
x_2 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1036____closed__1;
|
||||
x_2 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1035____closed__1;
|
||||
x_3 = lean_name_mk_string(x_1, x_2);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1036____closed__3() {
|
||||
static lean_object* _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1035____closed__3() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
|
|
@ -4414,13 +4413,13 @@ x_1 = lean_mk_string("Unbound local variables in declaration headers become impl
|
|||
return x_1;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1036____closed__4() {
|
||||
static lean_object* _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1035____closed__4() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4;
|
||||
x_1 = l_Lean_initFn____x40_Lean_Data_Options___hyg_487____closed__3;
|
||||
x_2 = l_Lean_instInhabitedParserDescr___closed__1;
|
||||
x_3 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1036____closed__3;
|
||||
x_3 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1035____closed__3;
|
||||
x_4 = lean_alloc_ctor(0, 3, 0);
|
||||
lean_ctor_set(x_4, 0, x_1);
|
||||
lean_ctor_set(x_4, 1, x_2);
|
||||
|
|
@ -4428,12 +4427,12 @@ lean_ctor_set(x_4, 2, x_3);
|
|||
return x_4;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1036_(lean_object* x_1) {
|
||||
lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1035_(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_2; lean_object* x_3; lean_object* x_4;
|
||||
x_2 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1036____closed__2;
|
||||
x_3 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1036____closed__4;
|
||||
x_2 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1035____closed__2;
|
||||
x_3 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1035____closed__4;
|
||||
x_4 = lean_register_option(x_2, x_3, x_1);
|
||||
return x_4;
|
||||
}
|
||||
|
|
@ -4442,7 +4441,7 @@ uint8_t l___private_Lean_Elab_Term_0__Lean_Elab_Term_getAutoBoundImplicitLocalOp
|
|||
_start:
|
||||
{
|
||||
lean_object* x_2; uint8_t x_3; uint8_t x_4;
|
||||
x_2 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1036____closed__2;
|
||||
x_2 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1035____closed__2;
|
||||
x_3 = 1;
|
||||
x_4 = l_Lean_KVMap_getBool(x_1, x_2, x_3);
|
||||
return x_4;
|
||||
|
|
@ -8482,107 +8481,161 @@ x_2 = l_Lean_stringToMessageData(x_1);
|
|||
return x_2;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Elab_Term_mkTypeMismatchError___closed__3() {
|
||||
lean_object* l_Lean_Elab_Term_mkTypeMismatchError(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_mk_string(" has type");
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Elab_Term_mkTypeMismatchError___closed__4() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2;
|
||||
x_1 = l_Lean_Elab_Term_mkTypeMismatchError___closed__3;
|
||||
x_2 = l_Lean_stringToMessageData(x_1);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Elab_Term_mkTypeMismatchError(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_5; lean_object* x_6;
|
||||
x_5 = l_Lean_indentExpr(x_3);
|
||||
x_6 = l_Lean_indentExpr(x_4);
|
||||
lean_object* x_12;
|
||||
x_12 = l_Lean_Meta_mkHasTypeButIsExpectedMsg(x_3, x_4, x_7, x_8, x_9, x_10, x_11);
|
||||
if (lean_obj_tag(x_1) == 0)
|
||||
{
|
||||
lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19;
|
||||
x_7 = l_Lean_indentExpr(x_2);
|
||||
x_8 = l_Lean_Elab_Term_mkTypeMismatchError___closed__2;
|
||||
x_9 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_9, 0, x_8);
|
||||
lean_ctor_set(x_9, 1, x_7);
|
||||
x_10 = l_Lean_Meta_throwLetTypeMismatchMessage___rarg___closed__8;
|
||||
x_11 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_11, 0, x_9);
|
||||
lean_ctor_set(x_11, 1, x_10);
|
||||
x_12 = l_Lean_KernelException_toMessageData___closed__15;
|
||||
x_13 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_13, 0, x_12);
|
||||
lean_ctor_set(x_13, 1, x_11);
|
||||
x_14 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_14, 0, x_13);
|
||||
lean_ctor_set(x_14, 1, x_12);
|
||||
x_15 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_15, 0, x_14);
|
||||
lean_ctor_set(x_15, 1, x_5);
|
||||
x_16 = l_Lean_Meta_throwLetTypeMismatchMessage___rarg___closed__10;
|
||||
uint8_t x_13;
|
||||
x_13 = !lean_is_exclusive(x_12);
|
||||
if (x_13 == 0)
|
||||
{
|
||||
lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24;
|
||||
x_14 = lean_ctor_get(x_12, 0);
|
||||
x_15 = l_Lean_indentExpr(x_2);
|
||||
x_16 = l_Lean_Elab_Term_mkTypeMismatchError___closed__2;
|
||||
x_17 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_17, 0, x_15);
|
||||
lean_ctor_set(x_17, 1, x_16);
|
||||
x_18 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_18, 0, x_17);
|
||||
lean_ctor_set(x_18, 1, x_6);
|
||||
lean_ctor_set(x_17, 0, x_16);
|
||||
lean_ctor_set(x_17, 1, x_15);
|
||||
x_18 = l_Array_foldlMUnsafe_fold___at_Lean_withNestedTraces___spec__5___closed__1;
|
||||
x_19 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_19, 0, x_18);
|
||||
lean_ctor_set(x_19, 1, x_12);
|
||||
return x_19;
|
||||
lean_ctor_set(x_19, 0, x_17);
|
||||
lean_ctor_set(x_19, 1, x_18);
|
||||
x_20 = l_Lean_KernelException_toMessageData___closed__15;
|
||||
x_21 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_21, 0, x_20);
|
||||
lean_ctor_set(x_21, 1, x_19);
|
||||
x_22 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_22, 0, x_21);
|
||||
lean_ctor_set(x_22, 1, x_20);
|
||||
x_23 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_23, 0, x_22);
|
||||
lean_ctor_set(x_23, 1, x_14);
|
||||
x_24 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_24, 0, x_23);
|
||||
lean_ctor_set(x_24, 1, x_20);
|
||||
lean_ctor_set(x_12, 0, x_24);
|
||||
return x_12;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32;
|
||||
lean_dec(x_2);
|
||||
x_20 = lean_ctor_get(x_1, 0);
|
||||
x_21 = l_Lean_stringToMessageData(x_20);
|
||||
x_22 = l_Lean_KernelException_toMessageData___closed__15;
|
||||
x_23 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_23, 0, x_22);
|
||||
lean_ctor_set(x_23, 1, x_21);
|
||||
x_24 = l_Lean_Elab_Term_mkTypeMismatchError___closed__4;
|
||||
x_25 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_25, 0, x_23);
|
||||
lean_ctor_set(x_25, 1, x_24);
|
||||
x_26 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_26, 0, x_22);
|
||||
lean_ctor_set(x_26, 1, x_25);
|
||||
x_27 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_27, 0, x_26);
|
||||
lean_ctor_set(x_27, 1, x_22);
|
||||
x_28 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_28, 0, x_27);
|
||||
lean_ctor_set(x_28, 1, x_5);
|
||||
x_29 = l_Lean_Meta_throwLetTypeMismatchMessage___rarg___closed__10;
|
||||
x_30 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_30, 0, x_28);
|
||||
lean_ctor_set(x_30, 1, x_29);
|
||||
lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37;
|
||||
x_25 = lean_ctor_get(x_12, 0);
|
||||
x_26 = lean_ctor_get(x_12, 1);
|
||||
lean_inc(x_26);
|
||||
lean_inc(x_25);
|
||||
lean_dec(x_12);
|
||||
x_27 = l_Lean_indentExpr(x_2);
|
||||
x_28 = l_Lean_Elab_Term_mkTypeMismatchError___closed__2;
|
||||
x_29 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_29, 0, x_28);
|
||||
lean_ctor_set(x_29, 1, x_27);
|
||||
x_30 = l_Array_foldlMUnsafe_fold___at_Lean_withNestedTraces___spec__5___closed__1;
|
||||
x_31 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_31, 0, x_30);
|
||||
lean_ctor_set(x_31, 1, x_6);
|
||||
x_32 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_32, 0, x_31);
|
||||
lean_ctor_set(x_32, 1, x_22);
|
||||
return x_32;
|
||||
lean_ctor_set(x_31, 0, x_29);
|
||||
lean_ctor_set(x_31, 1, x_30);
|
||||
x_32 = l_Lean_KernelException_toMessageData___closed__15;
|
||||
x_33 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_33, 0, x_32);
|
||||
lean_ctor_set(x_33, 1, x_31);
|
||||
x_34 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_34, 0, x_33);
|
||||
lean_ctor_set(x_34, 1, x_32);
|
||||
x_35 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_35, 0, x_34);
|
||||
lean_ctor_set(x_35, 1, x_25);
|
||||
x_36 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_36, 0, x_35);
|
||||
lean_ctor_set(x_36, 1, x_32);
|
||||
x_37 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_37, 0, x_36);
|
||||
lean_ctor_set(x_37, 1, x_26);
|
||||
return x_37;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_38;
|
||||
lean_dec(x_2);
|
||||
x_38 = !lean_is_exclusive(x_12);
|
||||
if (x_38 == 0)
|
||||
{
|
||||
lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49;
|
||||
x_39 = lean_ctor_get(x_1, 0);
|
||||
x_40 = lean_ctor_get(x_12, 0);
|
||||
x_41 = l_Lean_stringToMessageData(x_39);
|
||||
x_42 = l_Lean_KernelException_toMessageData___closed__15;
|
||||
x_43 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_43, 0, x_42);
|
||||
lean_ctor_set(x_43, 1, x_41);
|
||||
x_44 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_CheckAssignment_addAssignmentInfo___rarg___closed__3;
|
||||
x_45 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_45, 0, x_43);
|
||||
lean_ctor_set(x_45, 1, x_44);
|
||||
x_46 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_46, 0, x_42);
|
||||
lean_ctor_set(x_46, 1, x_45);
|
||||
x_47 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_47, 0, x_46);
|
||||
lean_ctor_set(x_47, 1, x_42);
|
||||
x_48 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_48, 0, x_47);
|
||||
lean_ctor_set(x_48, 1, x_40);
|
||||
x_49 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_49, 0, x_48);
|
||||
lean_ctor_set(x_49, 1, x_42);
|
||||
lean_ctor_set(x_12, 0, x_49);
|
||||
return x_12;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62;
|
||||
x_50 = lean_ctor_get(x_1, 0);
|
||||
x_51 = lean_ctor_get(x_12, 0);
|
||||
x_52 = lean_ctor_get(x_12, 1);
|
||||
lean_inc(x_52);
|
||||
lean_inc(x_51);
|
||||
lean_dec(x_12);
|
||||
x_53 = l_Lean_stringToMessageData(x_50);
|
||||
x_54 = l_Lean_KernelException_toMessageData___closed__15;
|
||||
x_55 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_55, 0, x_54);
|
||||
lean_ctor_set(x_55, 1, x_53);
|
||||
x_56 = l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_CheckAssignment_addAssignmentInfo___rarg___closed__3;
|
||||
x_57 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_57, 0, x_55);
|
||||
lean_ctor_set(x_57, 1, x_56);
|
||||
x_58 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_58, 0, x_54);
|
||||
lean_ctor_set(x_58, 1, x_57);
|
||||
x_59 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_59, 0, x_58);
|
||||
lean_ctor_set(x_59, 1, x_54);
|
||||
x_60 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_60, 0, x_59);
|
||||
lean_ctor_set(x_60, 1, x_51);
|
||||
x_61 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_61, 0, x_60);
|
||||
lean_ctor_set(x_61, 1, x_54);
|
||||
x_62 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_62, 0, x_61);
|
||||
lean_ctor_set(x_62, 1, x_52);
|
||||
return x_62;
|
||||
}
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Elab_Term_mkTypeMismatchError___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
}
|
||||
lean_object* l_Lean_Elab_Term_mkTypeMismatchError___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_5;
|
||||
x_5 = l_Lean_Elab_Term_mkTypeMismatchError(x_1, x_2, x_3, x_4);
|
||||
lean_object* x_12;
|
||||
x_12 = l_Lean_Elab_Term_mkTypeMismatchError(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11);
|
||||
lean_dec(x_6);
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_1);
|
||||
return x_5;
|
||||
return x_12;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Elab_Term_throwTypeMismatchError_match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
|
||||
|
|
@ -8677,31 +8730,40 @@ _start:
|
|||
{
|
||||
if (lean_obj_tag(x_5) == 0)
|
||||
{
|
||||
lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17;
|
||||
x_14 = l_Lean_Elab_Term_mkTypeMismatchError(x_1, x_4, x_3, x_2);
|
||||
x_15 = l_Lean_instInhabitedMessageData___closed__1;
|
||||
x_16 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_16, 0, x_14);
|
||||
lean_ctor_set(x_16, 1, x_15);
|
||||
x_17 = l_Lean_throwError___at_Lean_Elab_Term_throwTypeMismatchError___spec__1___rarg(x_16, x_7, x_8, x_9, x_10, x_11, x_12, x_13);
|
||||
lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19;
|
||||
lean_inc(x_12);
|
||||
lean_inc(x_11);
|
||||
lean_inc(x_10);
|
||||
lean_inc(x_9);
|
||||
x_14 = l_Lean_Elab_Term_mkTypeMismatchError(x_1, x_4, x_3, x_2, x_7, x_8, x_9, x_10, x_11, x_12, x_13);
|
||||
x_15 = lean_ctor_get(x_14, 0);
|
||||
lean_inc(x_15);
|
||||
x_16 = lean_ctor_get(x_14, 1);
|
||||
lean_inc(x_16);
|
||||
lean_dec(x_14);
|
||||
x_17 = l_Lean_instInhabitedMessageData___closed__1;
|
||||
x_18 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_18, 0, x_15);
|
||||
lean_ctor_set(x_18, 1, x_17);
|
||||
x_19 = l_Lean_throwError___at_Lean_Elab_Term_throwTypeMismatchError___spec__1___rarg(x_18, x_7, x_8, x_9, x_10, x_11, x_12, x_16);
|
||||
lean_dec(x_12);
|
||||
lean_dec(x_11);
|
||||
lean_dec(x_10);
|
||||
lean_dec(x_9);
|
||||
return x_17;
|
||||
return x_19;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_18; lean_object* x_19; lean_object* x_20;
|
||||
lean_object* x_20; lean_object* x_21; lean_object* x_22;
|
||||
lean_dec(x_7);
|
||||
lean_dec(x_3);
|
||||
lean_dec(x_2);
|
||||
x_18 = lean_ctor_get(x_5, 0);
|
||||
lean_inc(x_18);
|
||||
x_20 = lean_ctor_get(x_5, 0);
|
||||
lean_inc(x_20);
|
||||
lean_dec(x_5);
|
||||
x_19 = l_Lean_instInhabitedMessageData___closed__1;
|
||||
x_20 = l_Lean_Meta_throwAppTypeMismatch___rarg(x_18, x_4, x_19, x_9, x_10, x_11, x_12, x_13);
|
||||
return x_20;
|
||||
x_21 = l_Lean_instInhabitedMessageData___closed__1;
|
||||
x_22 = l_Lean_Meta_throwAppTypeMismatch___rarg(x_20, x_4, x_21, x_9, x_10, x_11, x_12, x_13);
|
||||
return x_22;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -9338,7 +9400,7 @@ x_1 = lean_unsigned_to_nat(16u);
|
|||
return x_1;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2430____closed__1() {
|
||||
static lean_object* _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2447____closed__1() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
|
|
@ -9346,17 +9408,17 @@ x_1 = lean_mk_string("maxCoeSize");
|
|||
return x_1;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2430____closed__2() {
|
||||
static lean_object* _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2447____closed__2() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3;
|
||||
x_1 = lean_box(0);
|
||||
x_2 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2430____closed__1;
|
||||
x_2 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2447____closed__1;
|
||||
x_3 = lean_name_mk_string(x_1, x_2);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2430____closed__3() {
|
||||
static lean_object* _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2447____closed__3() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2;
|
||||
|
|
@ -9366,7 +9428,7 @@ lean_ctor_set(x_2, 0, x_1);
|
|||
return x_2;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2430____closed__4() {
|
||||
static lean_object* _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2447____closed__4() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
|
|
@ -9374,13 +9436,13 @@ x_1 = lean_mk_string("maximum number of instances used to construct an automatic
|
|||
return x_1;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2430____closed__5() {
|
||||
static lean_object* _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2447____closed__5() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4;
|
||||
x_1 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2430____closed__3;
|
||||
x_1 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2447____closed__3;
|
||||
x_2 = l_Lean_instInhabitedParserDescr___closed__1;
|
||||
x_3 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2430____closed__4;
|
||||
x_3 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2447____closed__4;
|
||||
x_4 = lean_alloc_ctor(0, 3, 0);
|
||||
lean_ctor_set(x_4, 0, x_1);
|
||||
lean_ctor_set(x_4, 1, x_2);
|
||||
|
|
@ -9388,12 +9450,12 @@ lean_ctor_set(x_4, 2, x_3);
|
|||
return x_4;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2430_(lean_object* x_1) {
|
||||
lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2447_(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_2; lean_object* x_3; lean_object* x_4;
|
||||
x_2 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2430____closed__2;
|
||||
x_3 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2430____closed__5;
|
||||
x_2 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2447____closed__2;
|
||||
x_3 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2447____closed__5;
|
||||
x_4 = lean_register_option(x_2, x_3, x_1);
|
||||
return x_4;
|
||||
}
|
||||
|
|
@ -9402,7 +9464,7 @@ lean_object* l___private_Lean_Elab_Term_0__Lean_Elab_Term_getCoeMaxSize(lean_obj
|
|||
_start:
|
||||
{
|
||||
lean_object* x_2; lean_object* x_3; lean_object* x_4;
|
||||
x_2 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2430____closed__2;
|
||||
x_2 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2447____closed__2;
|
||||
x_3 = l_Lean_Elab_Term_maxCoeSizeDefault;
|
||||
x_4 = l_Lean_KVMap_getNat(x_1, x_2, x_3);
|
||||
return x_4;
|
||||
|
|
@ -28255,7 +28317,7 @@ lean_dec(x_3);
|
|||
return x_9;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_5862____closed__1() {
|
||||
static lean_object* _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_5879____closed__1() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3;
|
||||
|
|
@ -28265,11 +28327,11 @@ x_3 = lean_name_mk_string(x_1, x_2);
|
|||
return x_3;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_5862_(lean_object* x_1) {
|
||||
lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_5879_(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_2; lean_object* x_3;
|
||||
x_2 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_5862____closed__1;
|
||||
x_2 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_5879____closed__1;
|
||||
x_3 = l_Lean_registerTraceClass(x_2, x_1);
|
||||
return x_3;
|
||||
}
|
||||
|
|
@ -28440,7 +28502,7 @@ lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lea
|
|||
x_97 = lean_ctor_get(x_91, 1);
|
||||
lean_inc(x_97);
|
||||
lean_dec(x_91);
|
||||
x_98 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_5862____closed__1;
|
||||
x_98 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_5879____closed__1;
|
||||
x_99 = l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at___private_Lean_Elab_Term_0__Lean_Elab_Term_postponeElabTerm___spec__2(x_98, x_2, x_3, x_4, x_5, x_6, x_7, x_97);
|
||||
x_100 = lean_ctor_get(x_99, 0);
|
||||
lean_inc(x_100);
|
||||
|
|
@ -28482,7 +28544,7 @@ lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean
|
|||
x_53 = lean_ctor_get(x_47, 1);
|
||||
lean_inc(x_53);
|
||||
lean_dec(x_47);
|
||||
x_54 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_5862____closed__1;
|
||||
x_54 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_5879____closed__1;
|
||||
x_55 = l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at___private_Lean_Elab_Term_0__Lean_Elab_Term_postponeElabTerm___spec__2(x_54, x_2, x_3, x_4, x_5, x_6, x_7, x_53);
|
||||
x_56 = lean_ctor_get(x_55, 0);
|
||||
lean_inc(x_56);
|
||||
|
|
@ -28563,7 +28625,7 @@ x_41 = l_Lean_KernelException_toMessageData___closed__15;
|
|||
x_42 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_42, 0, x_40);
|
||||
lean_ctor_set(x_42, 1, x_41);
|
||||
x_43 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_5862____closed__1;
|
||||
x_43 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_5879____closed__1;
|
||||
x_44 = l_Lean_addTrace___at___private_Lean_Elab_Term_0__Lean_Elab_Term_postponeElabTerm___spec__1(x_43, x_42, x_2, x_3, x_4, x_5, x_6, x_7, x_36);
|
||||
x_45 = lean_ctor_get(x_44, 1);
|
||||
lean_inc(x_45);
|
||||
|
|
@ -28625,7 +28687,7 @@ x_79 = l_Lean_KernelException_toMessageData___closed__15;
|
|||
x_80 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_80, 0, x_78);
|
||||
lean_ctor_set(x_80, 1, x_79);
|
||||
x_81 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_5862____closed__1;
|
||||
x_81 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_5879____closed__1;
|
||||
x_82 = l_Lean_addTrace___at___private_Lean_Elab_Term_0__Lean_Elab_Term_postponeElabTerm___spec__1(x_81, x_80, x_2, x_3, x_4, x_5, x_6, x_7, x_61);
|
||||
x_83 = lean_ctor_get(x_82, 1);
|
||||
lean_inc(x_83);
|
||||
|
|
@ -37268,7 +37330,7 @@ x_8 = l_Lean_Elab_Term_instMetaEvalTermElabM___rarg(x_1, x_2, x_3, x_4, x_7, x_6
|
|||
return x_8;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Elab_initFn____x40_Lean_Elab_Term___hyg_7623____closed__1() {
|
||||
static lean_object* _init_l_Lean_Elab_initFn____x40_Lean_Elab_Term___hyg_7640____closed__1() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3;
|
||||
|
|
@ -37278,7 +37340,7 @@ x_3 = lean_name_mk_string(x_1, x_2);
|
|||
return x_3;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Elab_initFn____x40_Lean_Elab_Term___hyg_7623_(lean_object* x_1) {
|
||||
lean_object* l_Lean_Elab_initFn____x40_Lean_Elab_Term___hyg_7640_(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_2; lean_object* x_3;
|
||||
|
|
@ -37290,7 +37352,7 @@ lean_object* x_4; lean_object* x_5; lean_object* x_6;
|
|||
x_4 = lean_ctor_get(x_3, 1);
|
||||
lean_inc(x_4);
|
||||
lean_dec(x_3);
|
||||
x_5 = l_Lean_Elab_initFn____x40_Lean_Elab_Term___hyg_7623____closed__1;
|
||||
x_5 = l_Lean_Elab_initFn____x40_Lean_Elab_Term___hyg_7640____closed__1;
|
||||
x_6 = l_Lean_registerTraceClass(x_5, x_4);
|
||||
if (lean_obj_tag(x_6) == 0)
|
||||
{
|
||||
|
|
@ -37508,15 +37570,15 @@ if (lean_io_result_is_error(res)) return res;
|
|||
l_Lean_Elab_Term_termElabAttribute = lean_io_result_get_value(res);
|
||||
lean_mark_persistent(l_Lean_Elab_Term_termElabAttribute);
|
||||
lean_dec_ref(res);
|
||||
l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1036____closed__1 = _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1036____closed__1();
|
||||
lean_mark_persistent(l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1036____closed__1);
|
||||
l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1036____closed__2 = _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1036____closed__2();
|
||||
lean_mark_persistent(l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1036____closed__2);
|
||||
l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1036____closed__3 = _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1036____closed__3();
|
||||
lean_mark_persistent(l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1036____closed__3);
|
||||
l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1036____closed__4 = _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1036____closed__4();
|
||||
lean_mark_persistent(l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1036____closed__4);
|
||||
res = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1036_(lean_io_mk_world());
|
||||
l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1035____closed__1 = _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1035____closed__1();
|
||||
lean_mark_persistent(l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1035____closed__1);
|
||||
l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1035____closed__2 = _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1035____closed__2();
|
||||
lean_mark_persistent(l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1035____closed__2);
|
||||
l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1035____closed__3 = _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1035____closed__3();
|
||||
lean_mark_persistent(l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1035____closed__3);
|
||||
l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1035____closed__4 = _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1035____closed__4();
|
||||
lean_mark_persistent(l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1035____closed__4);
|
||||
res = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_1035_(lean_io_mk_world());
|
||||
if (lean_io_result_is_error(res)) return res;
|
||||
lean_dec_ref(res);
|
||||
l_Lean_Elab_Term_throwErrorIfErrors___closed__1 = _init_l_Lean_Elab_Term_throwErrorIfErrors___closed__1();
|
||||
|
|
@ -37559,10 +37621,6 @@ l_Lean_Elab_Term_mkTypeMismatchError___closed__1 = _init_l_Lean_Elab_Term_mkType
|
|||
lean_mark_persistent(l_Lean_Elab_Term_mkTypeMismatchError___closed__1);
|
||||
l_Lean_Elab_Term_mkTypeMismatchError___closed__2 = _init_l_Lean_Elab_Term_mkTypeMismatchError___closed__2();
|
||||
lean_mark_persistent(l_Lean_Elab_Term_mkTypeMismatchError___closed__2);
|
||||
l_Lean_Elab_Term_mkTypeMismatchError___closed__3 = _init_l_Lean_Elab_Term_mkTypeMismatchError___closed__3();
|
||||
lean_mark_persistent(l_Lean_Elab_Term_mkTypeMismatchError___closed__3);
|
||||
l_Lean_Elab_Term_mkTypeMismatchError___closed__4 = _init_l_Lean_Elab_Term_mkTypeMismatchError___closed__4();
|
||||
lean_mark_persistent(l_Lean_Elab_Term_mkTypeMismatchError___closed__4);
|
||||
l_Lean_Elab_Term_synthesizeInstMVarCore___closed__1 = _init_l_Lean_Elab_Term_synthesizeInstMVarCore___closed__1();
|
||||
lean_mark_persistent(l_Lean_Elab_Term_synthesizeInstMVarCore___closed__1);
|
||||
l_Lean_Elab_Term_synthesizeInstMVarCore___closed__2 = _init_l_Lean_Elab_Term_synthesizeInstMVarCore___closed__2();
|
||||
|
|
@ -37579,17 +37637,17 @@ l_Lean_Elab_Term_synthesizeInstMVarCore___closed__7 = _init_l_Lean_Elab_Term_syn
|
|||
lean_mark_persistent(l_Lean_Elab_Term_synthesizeInstMVarCore___closed__7);
|
||||
l_Lean_Elab_Term_maxCoeSizeDefault = _init_l_Lean_Elab_Term_maxCoeSizeDefault();
|
||||
lean_mark_persistent(l_Lean_Elab_Term_maxCoeSizeDefault);
|
||||
l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2430____closed__1 = _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2430____closed__1();
|
||||
lean_mark_persistent(l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2430____closed__1);
|
||||
l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2430____closed__2 = _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2430____closed__2();
|
||||
lean_mark_persistent(l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2430____closed__2);
|
||||
l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2430____closed__3 = _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2430____closed__3();
|
||||
lean_mark_persistent(l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2430____closed__3);
|
||||
l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2430____closed__4 = _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2430____closed__4();
|
||||
lean_mark_persistent(l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2430____closed__4);
|
||||
l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2430____closed__5 = _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2430____closed__5();
|
||||
lean_mark_persistent(l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2430____closed__5);
|
||||
res = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2430_(lean_io_mk_world());
|
||||
l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2447____closed__1 = _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2447____closed__1();
|
||||
lean_mark_persistent(l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2447____closed__1);
|
||||
l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2447____closed__2 = _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2447____closed__2();
|
||||
lean_mark_persistent(l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2447____closed__2);
|
||||
l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2447____closed__3 = _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2447____closed__3();
|
||||
lean_mark_persistent(l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2447____closed__3);
|
||||
l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2447____closed__4 = _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2447____closed__4();
|
||||
lean_mark_persistent(l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2447____closed__4);
|
||||
l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2447____closed__5 = _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2447____closed__5();
|
||||
lean_mark_persistent(l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2447____closed__5);
|
||||
res = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_2447_(lean_io_mk_world());
|
||||
if (lean_io_result_is_error(res)) return res;
|
||||
lean_dec_ref(res);
|
||||
l_Lean_Elab_Term_tryCoeThunk_x3f_match__1___rarg___closed__1 = _init_l_Lean_Elab_Term_tryCoeThunk_x3f_match__1___rarg___closed__1();
|
||||
|
|
@ -37706,9 +37764,9 @@ l_Lean_Elab_Term_mkAuxName___closed__2 = _init_l_Lean_Elab_Term_mkAuxName___clos
|
|||
lean_mark_persistent(l_Lean_Elab_Term_mkAuxName___closed__2);
|
||||
l_Lean_Elab_Term_mkAuxName___closed__3 = _init_l_Lean_Elab_Term_mkAuxName___closed__3();
|
||||
lean_mark_persistent(l_Lean_Elab_Term_mkAuxName___closed__3);
|
||||
l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_5862____closed__1 = _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_5862____closed__1();
|
||||
lean_mark_persistent(l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_5862____closed__1);
|
||||
res = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_5862_(lean_io_mk_world());
|
||||
l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_5879____closed__1 = _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_5879____closed__1();
|
||||
lean_mark_persistent(l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_5879____closed__1);
|
||||
res = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Term___hyg_5879_(lean_io_mk_world());
|
||||
if (lean_io_result_is_error(res)) return res;
|
||||
lean_dec_ref(res);
|
||||
l_Lean_Elab_Term_isLetRecAuxMVar___closed__1 = _init_l_Lean_Elab_Term_isLetRecAuxMVar___closed__1();
|
||||
|
|
@ -37916,9 +37974,9 @@ l_Lean_Elab_Term_instMetaEvalTermElabM___rarg___closed__4 = _init_l_Lean_Elab_Te
|
|||
lean_mark_persistent(l_Lean_Elab_Term_instMetaEvalTermElabM___rarg___closed__4);
|
||||
l_Lean_Elab_Term_instMetaEvalTermElabM___rarg___closed__5 = _init_l_Lean_Elab_Term_instMetaEvalTermElabM___rarg___closed__5();
|
||||
lean_mark_persistent(l_Lean_Elab_Term_instMetaEvalTermElabM___rarg___closed__5);
|
||||
l_Lean_Elab_initFn____x40_Lean_Elab_Term___hyg_7623____closed__1 = _init_l_Lean_Elab_initFn____x40_Lean_Elab_Term___hyg_7623____closed__1();
|
||||
lean_mark_persistent(l_Lean_Elab_initFn____x40_Lean_Elab_Term___hyg_7623____closed__1);
|
||||
res = l_Lean_Elab_initFn____x40_Lean_Elab_Term___hyg_7623_(lean_io_mk_world());
|
||||
l_Lean_Elab_initFn____x40_Lean_Elab_Term___hyg_7640____closed__1 = _init_l_Lean_Elab_initFn____x40_Lean_Elab_Term___hyg_7640____closed__1();
|
||||
lean_mark_persistent(l_Lean_Elab_initFn____x40_Lean_Elab_Term___hyg_7640____closed__1);
|
||||
res = l_Lean_Elab_initFn____x40_Lean_Elab_Term___hyg_7640_(lean_io_mk_world());
|
||||
if (lean_io_result_is_error(res)) return res;
|
||||
lean_dec_ref(res);
|
||||
return lean_io_result_mk_ok(lean_box(0));
|
||||
|
|
|
|||
6
stage0/stdlib/Lean/Meta.c
generated
6
stage0/stdlib/Lean/Meta.c
generated
|
|
@ -1,6 +1,6 @@
|
|||
// Lean compiler output
|
||||
// Module: Lean.Meta
|
||||
// Imports: Init Lean.Meta.Basic Lean.Meta.LevelDefEq Lean.Meta.WHNF Lean.Meta.InferType Lean.Meta.FunInfo Lean.Meta.ExprDefEq Lean.Meta.DiscrTree Lean.Meta.Reduce Lean.Meta.Instances Lean.Meta.AbstractMVars Lean.Meta.SynthInstance Lean.Meta.AppBuilder Lean.Meta.Tactic Lean.Meta.KAbstract Lean.Meta.RecursorInfo Lean.Meta.GeneralizeTelescope Lean.Meta.Match Lean.Meta.ReduceEval Lean.Meta.Closure Lean.Meta.AbstractNestedProofs Lean.Meta.ForEachExpr Lean.Meta.Transform Lean.Meta.PPGoal Lean.Meta.UnificationHint
|
||||
// Imports: Init Lean.Meta.Basic Lean.Meta.LevelDefEq Lean.Meta.WHNF Lean.Meta.InferType Lean.Meta.FunInfo Lean.Meta.ExprDefEq Lean.Meta.DiscrTree Lean.Meta.Reduce Lean.Meta.Instances Lean.Meta.AbstractMVars Lean.Meta.SynthInstance Lean.Meta.AppBuilder Lean.Meta.Tactic Lean.Meta.KAbstract Lean.Meta.RecursorInfo Lean.Meta.GeneralizeTelescope Lean.Meta.Match Lean.Meta.ReduceEval Lean.Meta.Closure Lean.Meta.AbstractNestedProofs Lean.Meta.ForEachExpr Lean.Meta.Transform Lean.Meta.PPGoal Lean.Meta.UnificationHint Lean.Meta.Inductive
|
||||
#include <lean/lean.h>
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic ignored "-Wunused-parameter"
|
||||
|
|
@ -38,6 +38,7 @@ lean_object* initialize_Lean_Meta_ForEachExpr(lean_object*);
|
|||
lean_object* initialize_Lean_Meta_Transform(lean_object*);
|
||||
lean_object* initialize_Lean_Meta_PPGoal(lean_object*);
|
||||
lean_object* initialize_Lean_Meta_UnificationHint(lean_object*);
|
||||
lean_object* initialize_Lean_Meta_Inductive(lean_object*);
|
||||
static bool _G_initialized = false;
|
||||
lean_object* initialize_Lean_Meta(lean_object* w) {
|
||||
lean_object * res;
|
||||
|
|
@ -118,6 +119,9 @@ lean_dec_ref(res);
|
|||
res = initialize_Lean_Meta_UnificationHint(lean_io_mk_world());
|
||||
if (lean_io_result_is_error(res)) return res;
|
||||
lean_dec_ref(res);
|
||||
res = initialize_Lean_Meta_Inductive(lean_io_mk_world());
|
||||
if (lean_io_result_is_error(res)) return res;
|
||||
lean_dec_ref(res);
|
||||
return lean_io_result_mk_ok(lean_box(0));
|
||||
}
|
||||
#ifdef __cplusplus
|
||||
|
|
|
|||
1692
stage0/stdlib/Lean/Meta/Check.c
generated
1692
stage0/stdlib/Lean/Meta/Check.c
generated
File diff suppressed because it is too large
Load diff
6
stage0/stdlib/Lean/Meta/ExprDefEq.c
generated
6
stage0/stdlib/Lean/Meta/ExprDefEq.c
generated
|
|
@ -565,6 +565,7 @@ lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_unfoldDefEq___boxed(le
|
|||
lean_object* l_Lean_Meta_CheckAssignment_run(lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_MetavarContext_0__Lean_MetavarContext_DependsOn_dep_visitMain___at_Lean_Meta_CheckAssignment_check___spec__37(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
uint8_t l_Array_anyMUnsafe_any___at___private_Lean_Meta_ExprDefEq_0__Lean_Meta_processAssignment_process___spec__1(lean_object*, lean_object*, size_t, size_t);
|
||||
lean_object* l_Lean_Meta_forallBoundedTelescope___at_Lean_Meta_addPPExplicitToExposeDiff_visit___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
uint8_t l_Std_PersistentArray_anyM___at_Lean_Meta_CheckAssignment_check___spec__45(lean_object*, lean_object*);
|
||||
lean_object* l_Array_anyMUnsafe_any___at_Lean_Meta_CheckAssignment_check___spec__27___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_synthPending(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -725,7 +726,6 @@ uint8_t l_Array_anyMUnsafe_any___at_Lean_Meta_CheckAssignmentQuick_check_visit__
|
|||
lean_object* l_Lean_Meta_getConfig(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Array_anyMUnsafe_any___at_Lean_Meta_CheckAssignment_check___spec__33___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
uint8_t l_Array_anyMUnsafe_any___at_Lean_Meta_CheckAssignment_check___spec__28(lean_object*, lean_object*, size_t, size_t);
|
||||
lean_object* l_Lean_Meta_forallBoundedTelescope___at___private_Lean_Meta_FunInfo_0__Lean_Meta_getFunInfoAux___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_sameHeadSymbol_match__1(lean_object*);
|
||||
lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_unstuckMVar_match__1___rarg(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_MetavarContext_0__Lean_MetavarContext_DependsOn_dep_visit___at_Lean_Meta_CheckAssignment_check___spec__15(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -15549,7 +15549,7 @@ x_13 = lean_alloc_closure((void*)(l_Lean_Meta_CheckAssignment_assignToConstFun__
|
|||
lean_closure_set(x_13, 0, x_2);
|
||||
lean_closure_set(x_13, 1, x_3);
|
||||
lean_closure_set(x_13, 2, x_1);
|
||||
x_14 = l_Lean_Meta_forallBoundedTelescope___at___private_Lean_Meta_FunInfo_0__Lean_Meta_getFunInfoAux___spec__2___rarg(x_10, x_12, x_13, x_4, x_5, x_6, x_7, x_11);
|
||||
x_14 = l_Lean_Meta_forallBoundedTelescope___at_Lean_Meta_addPPExplicitToExposeDiff_visit___spec__2___rarg(x_10, x_12, x_13, x_4, x_5, x_6, x_7, x_11);
|
||||
return x_14;
|
||||
}
|
||||
else
|
||||
|
|
@ -41250,7 +41250,7 @@ x_15 = lean_alloc_closure((void*)(l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_a
|
|||
lean_closure_set(x_15, 0, x_2);
|
||||
lean_closure_set(x_15, 1, x_3);
|
||||
lean_closure_set(x_15, 2, x_1);
|
||||
x_16 = l_Lean_Meta_forallBoundedTelescope___at___private_Lean_Meta_FunInfo_0__Lean_Meta_getFunInfoAux___spec__2___rarg(x_13, x_14, x_15, x_4, x_5, x_6, x_7, x_12);
|
||||
x_16 = l_Lean_Meta_forallBoundedTelescope___at_Lean_Meta_addPPExplicitToExposeDiff_visit___spec__2___rarg(x_13, x_14, x_15, x_4, x_5, x_6, x_7, x_12);
|
||||
return x_16;
|
||||
}
|
||||
else
|
||||
|
|
|
|||
620
stage0/stdlib/Lean/Meta/Inductive.c
generated
Normal file
620
stage0/stdlib/Lean/Meta/Inductive.c
generated
Normal file
|
|
@ -0,0 +1,620 @@
|
|||
// Lean compiler output
|
||||
// Module: Lean.Meta.Inductive
|
||||
// Imports: Init Lean.Meta.ExprDefEq
|
||||
#include <lean/lean.h>
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic ignored "-Wunused-parameter"
|
||||
#pragma clang diagnostic ignored "-Wunused-label"
|
||||
#elif defined(__GNUC__) && !defined(__CLANG__)
|
||||
#pragma GCC diagnostic ignored "-Wunused-parameter"
|
||||
#pragma GCC diagnostic ignored "-Wunused-label"
|
||||
#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
|
||||
#endif
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
lean_object* l_Lean_Meta_compatibleCtors_match__2(lean_object*);
|
||||
lean_object* l_Lean_Meta_compatibleCtors(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
uint8_t lean_name_eq(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_compatibleCtors_match__1(lean_object*);
|
||||
lean_object* l_Lean_Meta_compatibleCtors_match__1___rarg(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_throwError___at_Lean_Meta_compatibleCtors___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_getConstInfoCtor___at_Lean_Meta_compatibleCtors___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_getConstInfoCtor___at_Lean_Meta_compatibleCtors___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_throwError___at_Lean_Meta_compatibleCtors___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
extern lean_object* l_Lean_KernelException_toMessageData___closed__3;
|
||||
lean_object* l_Lean_getConstInfo___at_Lean_Meta_getParamNames___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_addMessageContextFull___at_Lean_Meta_instAddMessageContextMetaM___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
extern lean_object* l_Lean_getConstInfoCtor___rarg___lambda__1___closed__2;
|
||||
lean_object* l_Lean_Meta_isExprDefEq(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_forallMetaTelescope(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_mkConst(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_compatibleCtors_match__2___rarg(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_compatibleCtors_match__1___rarg(lean_object* x_1, lean_object* x_2) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7;
|
||||
x_3 = lean_ctor_get(x_1, 1);
|
||||
lean_inc(x_3);
|
||||
x_4 = lean_ctor_get(x_1, 0);
|
||||
lean_inc(x_4);
|
||||
lean_dec(x_1);
|
||||
x_5 = lean_ctor_get(x_3, 0);
|
||||
lean_inc(x_5);
|
||||
x_6 = lean_ctor_get(x_3, 1);
|
||||
lean_inc(x_6);
|
||||
lean_dec(x_3);
|
||||
x_7 = lean_apply_3(x_2, x_4, x_5, x_6);
|
||||
return x_7;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Meta_compatibleCtors_match__1(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_2;
|
||||
x_2 = lean_alloc_closure((void*)(l_Lean_Meta_compatibleCtors_match__1___rarg), 2, 0);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Meta_compatibleCtors_match__2___rarg(lean_object* x_1, lean_object* x_2) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7;
|
||||
x_3 = lean_ctor_get(x_1, 1);
|
||||
lean_inc(x_3);
|
||||
x_4 = lean_ctor_get(x_1, 0);
|
||||
lean_inc(x_4);
|
||||
lean_dec(x_1);
|
||||
x_5 = lean_ctor_get(x_3, 0);
|
||||
lean_inc(x_5);
|
||||
x_6 = lean_ctor_get(x_3, 1);
|
||||
lean_inc(x_6);
|
||||
lean_dec(x_3);
|
||||
x_7 = lean_apply_3(x_2, x_4, x_5, x_6);
|
||||
return x_7;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Meta_compatibleCtors_match__2(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_2;
|
||||
x_2 = lean_alloc_closure((void*)(l_Lean_Meta_compatibleCtors_match__2___rarg), 2, 0);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_throwError___at_Lean_Meta_compatibleCtors___spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_7; lean_object* x_8; uint8_t x_9;
|
||||
x_7 = lean_ctor_get(x_4, 3);
|
||||
x_8 = l_Lean_addMessageContextFull___at_Lean_Meta_instAddMessageContextMetaM___spec__1(x_1, x_2, x_3, x_4, x_5, x_6);
|
||||
x_9 = !lean_is_exclusive(x_8);
|
||||
if (x_9 == 0)
|
||||
{
|
||||
lean_object* x_10; lean_object* x_11;
|
||||
x_10 = lean_ctor_get(x_8, 0);
|
||||
lean_inc(x_7);
|
||||
x_11 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_11, 0, x_7);
|
||||
lean_ctor_set(x_11, 1, x_10);
|
||||
lean_ctor_set_tag(x_8, 1);
|
||||
lean_ctor_set(x_8, 0, x_11);
|
||||
return x_8;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15;
|
||||
x_12 = lean_ctor_get(x_8, 0);
|
||||
x_13 = lean_ctor_get(x_8, 1);
|
||||
lean_inc(x_13);
|
||||
lean_inc(x_12);
|
||||
lean_dec(x_8);
|
||||
lean_inc(x_7);
|
||||
x_14 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_14, 0, x_7);
|
||||
lean_ctor_set(x_14, 1, x_12);
|
||||
x_15 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_15, 0, x_14);
|
||||
lean_ctor_set(x_15, 1, x_13);
|
||||
return x_15;
|
||||
}
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_getConstInfoCtor___at_Lean_Meta_compatibleCtors___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_7;
|
||||
lean_inc(x_1);
|
||||
x_7 = l_Lean_getConstInfo___at_Lean_Meta_getParamNames___spec__1(x_1, x_2, x_3, x_4, x_5, x_6);
|
||||
if (lean_obj_tag(x_7) == 0)
|
||||
{
|
||||
lean_object* x_8;
|
||||
x_8 = lean_ctor_get(x_7, 0);
|
||||
lean_inc(x_8);
|
||||
if (lean_obj_tag(x_8) == 6)
|
||||
{
|
||||
uint8_t x_9;
|
||||
lean_dec(x_1);
|
||||
x_9 = !lean_is_exclusive(x_7);
|
||||
if (x_9 == 0)
|
||||
{
|
||||
lean_object* x_10; lean_object* x_11;
|
||||
x_10 = lean_ctor_get(x_7, 0);
|
||||
lean_dec(x_10);
|
||||
x_11 = lean_ctor_get(x_8, 0);
|
||||
lean_inc(x_11);
|
||||
lean_dec(x_8);
|
||||
lean_ctor_set(x_7, 0, x_11);
|
||||
return x_7;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_12; lean_object* x_13; lean_object* x_14;
|
||||
x_12 = lean_ctor_get(x_7, 1);
|
||||
lean_inc(x_12);
|
||||
lean_dec(x_7);
|
||||
x_13 = lean_ctor_get(x_8, 0);
|
||||
lean_inc(x_13);
|
||||
lean_dec(x_8);
|
||||
x_14 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_14, 0, x_13);
|
||||
lean_ctor_set(x_14, 1, x_12);
|
||||
return x_14;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23;
|
||||
lean_dec(x_8);
|
||||
x_15 = lean_ctor_get(x_7, 1);
|
||||
lean_inc(x_15);
|
||||
lean_dec(x_7);
|
||||
x_16 = lean_box(0);
|
||||
x_17 = l_Lean_mkConst(x_1, x_16);
|
||||
x_18 = lean_alloc_ctor(2, 1, 0);
|
||||
lean_ctor_set(x_18, 0, x_17);
|
||||
x_19 = l_Lean_KernelException_toMessageData___closed__3;
|
||||
x_20 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_20, 0, x_19);
|
||||
lean_ctor_set(x_20, 1, x_18);
|
||||
x_21 = l_Lean_getConstInfoCtor___rarg___lambda__1___closed__2;
|
||||
x_22 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_22, 0, x_20);
|
||||
lean_ctor_set(x_22, 1, x_21);
|
||||
x_23 = l_Lean_throwError___at_Lean_Meta_compatibleCtors___spec__2(x_22, x_2, x_3, x_4, x_5, x_15);
|
||||
return x_23;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_24;
|
||||
lean_dec(x_1);
|
||||
x_24 = !lean_is_exclusive(x_7);
|
||||
if (x_24 == 0)
|
||||
{
|
||||
return x_7;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_25; lean_object* x_26; lean_object* x_27;
|
||||
x_25 = lean_ctor_get(x_7, 0);
|
||||
x_26 = lean_ctor_get(x_7, 1);
|
||||
lean_inc(x_26);
|
||||
lean_inc(x_25);
|
||||
lean_dec(x_7);
|
||||
x_27 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_27, 0, x_25);
|
||||
lean_ctor_set(x_27, 1, x_26);
|
||||
return x_27;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Meta_compatibleCtors(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_8;
|
||||
x_8 = l_Lean_getConstInfoCtor___at_Lean_Meta_compatibleCtors___spec__1(x_1, x_3, x_4, x_5, x_6, x_7);
|
||||
if (lean_obj_tag(x_8) == 0)
|
||||
{
|
||||
lean_object* x_9; lean_object* x_10; lean_object* x_11;
|
||||
x_9 = lean_ctor_get(x_8, 0);
|
||||
lean_inc(x_9);
|
||||
x_10 = lean_ctor_get(x_8, 1);
|
||||
lean_inc(x_10);
|
||||
lean_dec(x_8);
|
||||
x_11 = l_Lean_getConstInfoCtor___at_Lean_Meta_compatibleCtors___spec__1(x_2, x_3, x_4, x_5, x_6, x_10);
|
||||
if (lean_obj_tag(x_11) == 0)
|
||||
{
|
||||
uint8_t x_12;
|
||||
x_12 = !lean_is_exclusive(x_11);
|
||||
if (x_12 == 0)
|
||||
{
|
||||
lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; uint8_t x_17;
|
||||
x_13 = lean_ctor_get(x_11, 0);
|
||||
x_14 = lean_ctor_get(x_11, 1);
|
||||
x_15 = lean_ctor_get(x_9, 1);
|
||||
lean_inc(x_15);
|
||||
x_16 = lean_ctor_get(x_13, 1);
|
||||
lean_inc(x_16);
|
||||
x_17 = lean_name_eq(x_15, x_16);
|
||||
lean_dec(x_16);
|
||||
lean_dec(x_15);
|
||||
if (x_17 == 0)
|
||||
{
|
||||
uint8_t x_18; lean_object* x_19;
|
||||
lean_dec(x_13);
|
||||
lean_dec(x_9);
|
||||
lean_dec(x_6);
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_3);
|
||||
x_18 = 0;
|
||||
x_19 = lean_box(x_18);
|
||||
lean_ctor_set(x_11, 0, x_19);
|
||||
return x_11;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_20; lean_object* x_21; uint8_t x_22; lean_object* x_23;
|
||||
lean_free_object(x_11);
|
||||
x_20 = lean_ctor_get(x_9, 0);
|
||||
lean_inc(x_20);
|
||||
lean_dec(x_9);
|
||||
x_21 = lean_ctor_get(x_20, 2);
|
||||
lean_inc(x_21);
|
||||
lean_dec(x_20);
|
||||
x_22 = 0;
|
||||
lean_inc(x_6);
|
||||
lean_inc(x_5);
|
||||
lean_inc(x_4);
|
||||
lean_inc(x_3);
|
||||
x_23 = l_Lean_Meta_forallMetaTelescope(x_21, x_22, x_3, x_4, x_5, x_6, x_14);
|
||||
if (lean_obj_tag(x_23) == 0)
|
||||
{
|
||||
lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30;
|
||||
x_24 = lean_ctor_get(x_23, 0);
|
||||
lean_inc(x_24);
|
||||
x_25 = lean_ctor_get(x_24, 1);
|
||||
lean_inc(x_25);
|
||||
lean_dec(x_24);
|
||||
x_26 = lean_ctor_get(x_23, 1);
|
||||
lean_inc(x_26);
|
||||
lean_dec(x_23);
|
||||
x_27 = lean_ctor_get(x_25, 1);
|
||||
lean_inc(x_27);
|
||||
lean_dec(x_25);
|
||||
x_28 = lean_ctor_get(x_13, 0);
|
||||
lean_inc(x_28);
|
||||
lean_dec(x_13);
|
||||
x_29 = lean_ctor_get(x_28, 2);
|
||||
lean_inc(x_29);
|
||||
lean_dec(x_28);
|
||||
lean_inc(x_6);
|
||||
lean_inc(x_5);
|
||||
lean_inc(x_4);
|
||||
lean_inc(x_3);
|
||||
x_30 = l_Lean_Meta_forallMetaTelescope(x_29, x_22, x_3, x_4, x_5, x_6, x_26);
|
||||
if (lean_obj_tag(x_30) == 0)
|
||||
{
|
||||
lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35;
|
||||
x_31 = lean_ctor_get(x_30, 0);
|
||||
lean_inc(x_31);
|
||||
x_32 = lean_ctor_get(x_31, 1);
|
||||
lean_inc(x_32);
|
||||
lean_dec(x_31);
|
||||
x_33 = lean_ctor_get(x_30, 1);
|
||||
lean_inc(x_33);
|
||||
lean_dec(x_30);
|
||||
x_34 = lean_ctor_get(x_32, 1);
|
||||
lean_inc(x_34);
|
||||
lean_dec(x_32);
|
||||
x_35 = l_Lean_Meta_isExprDefEq(x_27, x_34, x_3, x_4, x_5, x_6, x_33);
|
||||
return x_35;
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_36;
|
||||
lean_dec(x_27);
|
||||
lean_dec(x_6);
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_3);
|
||||
x_36 = !lean_is_exclusive(x_30);
|
||||
if (x_36 == 0)
|
||||
{
|
||||
return x_30;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_37; lean_object* x_38; lean_object* x_39;
|
||||
x_37 = lean_ctor_get(x_30, 0);
|
||||
x_38 = lean_ctor_get(x_30, 1);
|
||||
lean_inc(x_38);
|
||||
lean_inc(x_37);
|
||||
lean_dec(x_30);
|
||||
x_39 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_39, 0, x_37);
|
||||
lean_ctor_set(x_39, 1, x_38);
|
||||
return x_39;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_40;
|
||||
lean_dec(x_13);
|
||||
lean_dec(x_6);
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_3);
|
||||
x_40 = !lean_is_exclusive(x_23);
|
||||
if (x_40 == 0)
|
||||
{
|
||||
return x_23;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_41; lean_object* x_42; lean_object* x_43;
|
||||
x_41 = lean_ctor_get(x_23, 0);
|
||||
x_42 = lean_ctor_get(x_23, 1);
|
||||
lean_inc(x_42);
|
||||
lean_inc(x_41);
|
||||
lean_dec(x_23);
|
||||
x_43 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_43, 0, x_41);
|
||||
lean_ctor_set(x_43, 1, x_42);
|
||||
return x_43;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; uint8_t x_48;
|
||||
x_44 = lean_ctor_get(x_11, 0);
|
||||
x_45 = lean_ctor_get(x_11, 1);
|
||||
lean_inc(x_45);
|
||||
lean_inc(x_44);
|
||||
lean_dec(x_11);
|
||||
x_46 = lean_ctor_get(x_9, 1);
|
||||
lean_inc(x_46);
|
||||
x_47 = lean_ctor_get(x_44, 1);
|
||||
lean_inc(x_47);
|
||||
x_48 = lean_name_eq(x_46, x_47);
|
||||
lean_dec(x_47);
|
||||
lean_dec(x_46);
|
||||
if (x_48 == 0)
|
||||
{
|
||||
uint8_t x_49; lean_object* x_50; lean_object* x_51;
|
||||
lean_dec(x_44);
|
||||
lean_dec(x_9);
|
||||
lean_dec(x_6);
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_3);
|
||||
x_49 = 0;
|
||||
x_50 = lean_box(x_49);
|
||||
x_51 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_51, 0, x_50);
|
||||
lean_ctor_set(x_51, 1, x_45);
|
||||
return x_51;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_52; lean_object* x_53; uint8_t x_54; lean_object* x_55;
|
||||
x_52 = lean_ctor_get(x_9, 0);
|
||||
lean_inc(x_52);
|
||||
lean_dec(x_9);
|
||||
x_53 = lean_ctor_get(x_52, 2);
|
||||
lean_inc(x_53);
|
||||
lean_dec(x_52);
|
||||
x_54 = 0;
|
||||
lean_inc(x_6);
|
||||
lean_inc(x_5);
|
||||
lean_inc(x_4);
|
||||
lean_inc(x_3);
|
||||
x_55 = l_Lean_Meta_forallMetaTelescope(x_53, x_54, x_3, x_4, x_5, x_6, x_45);
|
||||
if (lean_obj_tag(x_55) == 0)
|
||||
{
|
||||
lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62;
|
||||
x_56 = lean_ctor_get(x_55, 0);
|
||||
lean_inc(x_56);
|
||||
x_57 = lean_ctor_get(x_56, 1);
|
||||
lean_inc(x_57);
|
||||
lean_dec(x_56);
|
||||
x_58 = lean_ctor_get(x_55, 1);
|
||||
lean_inc(x_58);
|
||||
lean_dec(x_55);
|
||||
x_59 = lean_ctor_get(x_57, 1);
|
||||
lean_inc(x_59);
|
||||
lean_dec(x_57);
|
||||
x_60 = lean_ctor_get(x_44, 0);
|
||||
lean_inc(x_60);
|
||||
lean_dec(x_44);
|
||||
x_61 = lean_ctor_get(x_60, 2);
|
||||
lean_inc(x_61);
|
||||
lean_dec(x_60);
|
||||
lean_inc(x_6);
|
||||
lean_inc(x_5);
|
||||
lean_inc(x_4);
|
||||
lean_inc(x_3);
|
||||
x_62 = l_Lean_Meta_forallMetaTelescope(x_61, x_54, x_3, x_4, x_5, x_6, x_58);
|
||||
if (lean_obj_tag(x_62) == 0)
|
||||
{
|
||||
lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67;
|
||||
x_63 = lean_ctor_get(x_62, 0);
|
||||
lean_inc(x_63);
|
||||
x_64 = lean_ctor_get(x_63, 1);
|
||||
lean_inc(x_64);
|
||||
lean_dec(x_63);
|
||||
x_65 = lean_ctor_get(x_62, 1);
|
||||
lean_inc(x_65);
|
||||
lean_dec(x_62);
|
||||
x_66 = lean_ctor_get(x_64, 1);
|
||||
lean_inc(x_66);
|
||||
lean_dec(x_64);
|
||||
x_67 = l_Lean_Meta_isExprDefEq(x_59, x_66, x_3, x_4, x_5, x_6, x_65);
|
||||
return x_67;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71;
|
||||
lean_dec(x_59);
|
||||
lean_dec(x_6);
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_3);
|
||||
x_68 = lean_ctor_get(x_62, 0);
|
||||
lean_inc(x_68);
|
||||
x_69 = lean_ctor_get(x_62, 1);
|
||||
lean_inc(x_69);
|
||||
if (lean_is_exclusive(x_62)) {
|
||||
lean_ctor_release(x_62, 0);
|
||||
lean_ctor_release(x_62, 1);
|
||||
x_70 = x_62;
|
||||
} else {
|
||||
lean_dec_ref(x_62);
|
||||
x_70 = lean_box(0);
|
||||
}
|
||||
if (lean_is_scalar(x_70)) {
|
||||
x_71 = lean_alloc_ctor(1, 2, 0);
|
||||
} else {
|
||||
x_71 = x_70;
|
||||
}
|
||||
lean_ctor_set(x_71, 0, x_68);
|
||||
lean_ctor_set(x_71, 1, x_69);
|
||||
return x_71;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75;
|
||||
lean_dec(x_44);
|
||||
lean_dec(x_6);
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_3);
|
||||
x_72 = lean_ctor_get(x_55, 0);
|
||||
lean_inc(x_72);
|
||||
x_73 = lean_ctor_get(x_55, 1);
|
||||
lean_inc(x_73);
|
||||
if (lean_is_exclusive(x_55)) {
|
||||
lean_ctor_release(x_55, 0);
|
||||
lean_ctor_release(x_55, 1);
|
||||
x_74 = x_55;
|
||||
} else {
|
||||
lean_dec_ref(x_55);
|
||||
x_74 = lean_box(0);
|
||||
}
|
||||
if (lean_is_scalar(x_74)) {
|
||||
x_75 = lean_alloc_ctor(1, 2, 0);
|
||||
} else {
|
||||
x_75 = x_74;
|
||||
}
|
||||
lean_ctor_set(x_75, 0, x_72);
|
||||
lean_ctor_set(x_75, 1, x_73);
|
||||
return x_75;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_76;
|
||||
lean_dec(x_9);
|
||||
lean_dec(x_6);
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_3);
|
||||
x_76 = !lean_is_exclusive(x_11);
|
||||
if (x_76 == 0)
|
||||
{
|
||||
return x_11;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_77; lean_object* x_78; lean_object* x_79;
|
||||
x_77 = lean_ctor_get(x_11, 0);
|
||||
x_78 = lean_ctor_get(x_11, 1);
|
||||
lean_inc(x_78);
|
||||
lean_inc(x_77);
|
||||
lean_dec(x_11);
|
||||
x_79 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_79, 0, x_77);
|
||||
lean_ctor_set(x_79, 1, x_78);
|
||||
return x_79;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_80;
|
||||
lean_dec(x_6);
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_3);
|
||||
lean_dec(x_2);
|
||||
x_80 = !lean_is_exclusive(x_8);
|
||||
if (x_80 == 0)
|
||||
{
|
||||
return x_8;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_81; lean_object* x_82; lean_object* x_83;
|
||||
x_81 = lean_ctor_get(x_8, 0);
|
||||
x_82 = lean_ctor_get(x_8, 1);
|
||||
lean_inc(x_82);
|
||||
lean_inc(x_81);
|
||||
lean_dec(x_8);
|
||||
x_83 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_83, 0, x_81);
|
||||
lean_ctor_set(x_83, 1, x_82);
|
||||
return x_83;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_throwError___at_Lean_Meta_compatibleCtors___spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_7;
|
||||
x_7 = l_Lean_throwError___at_Lean_Meta_compatibleCtors___spec__2(x_1, x_2, x_3, x_4, x_5, x_6);
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_3);
|
||||
lean_dec(x_2);
|
||||
return x_7;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_getConstInfoCtor___at_Lean_Meta_compatibleCtors___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_7;
|
||||
x_7 = l_Lean_getConstInfoCtor___at_Lean_Meta_compatibleCtors___spec__1(x_1, x_2, x_3, x_4, x_5, x_6);
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_3);
|
||||
lean_dec(x_2);
|
||||
return x_7;
|
||||
}
|
||||
}
|
||||
lean_object* initialize_Init(lean_object*);
|
||||
lean_object* initialize_Lean_Meta_ExprDefEq(lean_object*);
|
||||
static bool _G_initialized = false;
|
||||
lean_object* initialize_Lean_Meta_Inductive(lean_object* w) {
|
||||
lean_object * res;
|
||||
if (_G_initialized) return lean_io_result_mk_ok(lean_box(0));
|
||||
_G_initialized = true;
|
||||
res = initialize_Init(lean_io_mk_world());
|
||||
if (lean_io_result_is_error(res)) return res;
|
||||
lean_dec_ref(res);
|
||||
res = initialize_Lean_Meta_ExprDefEq(lean_io_mk_world());
|
||||
if (lean_io_result_is_error(res)) return res;
|
||||
lean_dec_ref(res);
|
||||
return lean_io_result_mk_ok(lean_box(0));
|
||||
}
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
389
stage0/stdlib/Lean/Meta/Match/Basic.c
generated
389
stage0/stdlib/Lean/Meta/Match/Basic.c
generated
|
|
@ -1,6 +1,6 @@
|
|||
// Lean compiler output
|
||||
// Module: Lean.Meta.Match.Basic
|
||||
// Imports: Init Lean.Meta.Match.MatcherInfo Lean.Meta.Match.CaseArraySizes
|
||||
// Imports: Init Lean.Meta.Check Lean.Meta.Match.MatcherInfo Lean.Meta.Match.CaseArraySizes
|
||||
#include <lean/lean.h>
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic ignored "-Wunused-parameter"
|
||||
|
|
@ -21,6 +21,7 @@ lean_object* l_Lean_Meta_Match_Pattern_toExpr_visit___boxed(lean_object*, lean_o
|
|||
lean_object* l_List_mapM___at_Lean_Meta_Match_instantiatePatternMVars___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_Match_Pattern_toExpr_visit___closed__2;
|
||||
lean_object* l_List_mapM___at_Lean_Meta_Match_instantiatePatternMVars___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_addPPExplicitToExposeDiff(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_List_map___at_Lean_Meta_Match_Example_applyFVarSubst___spec__2___boxed(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_Match_Pattern_toMessageData___closed__7;
|
||||
lean_object* l_List_map___at_Lean_Meta_Match_Example_toMessageData___spec__2(lean_object*);
|
||||
|
|
@ -57,6 +58,7 @@ lean_object* l_Lean_Meta_Match_Pattern_toExpr_visit___closed__4;
|
|||
lean_object* l_Lean_MessageData_ofList(lean_object*);
|
||||
lean_object* l_Lean_Meta_Match_Example_applyFVarSubst_match__1(lean_object*);
|
||||
lean_object* l_ReaderT_bind___at_Lean_Meta_instMonadLCtxMetaM___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_Match_Alt_checkAndReplaceFVarId_match__2(lean_object*);
|
||||
lean_object* l_Std_AssocList_find_x3f___at_Lean_Meta_FVarSubst_find_x3f___spec__1(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_Match_Alt_applyFVarSubst___boxed(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_Match_Problem_toMessageData___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -85,6 +87,7 @@ lean_object* l_Lean_Meta_Match_Example_varsToUnderscore(lean_object*);
|
|||
lean_object* l_Lean_Meta_Match_Example_applyFVarSubst_match__2(lean_object*);
|
||||
lean_object* l_Lean_Meta_Match_Pattern_toExpr_visit(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_Match_Pattern_applyFVarSubst___boxed(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___closed__4;
|
||||
lean_object* l_Lean_Meta_Match_Alt_checkAndReplaceFVarId(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_List_mapM___at_Lean_Meta_Match_Problem_toMessageData___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_Match_Pattern_hasExprMVar_match__1(lean_object*);
|
||||
|
|
@ -97,6 +100,7 @@ uint8_t l_Lean_Expr_hasExprMVar(lean_object*);
|
|||
lean_object* l_Lean_replaceRef(lean_object*, lean_object*);
|
||||
lean_object* l_List_filterAux___at_Lean_Meta_Match_Alt_replaceFVarId___spec__1___boxed(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_List_foldl___at_Lean_Meta_Match_Example_toMessageData___spec__1(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___closed__2;
|
||||
lean_object* l_Lean_Meta_instantiateLocalDeclMVars(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_Match_Pattern_applyFVarSubst_match__3(lean_object*);
|
||||
lean_object* l_Lean_Meta_Match_Pattern_toMessageData___closed__4;
|
||||
|
|
@ -118,6 +122,7 @@ lean_object* l_List_map___at_Lean_Meta_Match_Example_applyFVarSubst___spec__1(le
|
|||
lean_object* l_Lean_Meta_Match_Pattern_applyFVarSubst_match__1___rarg(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_Match_Problem_toMessageData___lambda__1___closed__3;
|
||||
lean_object* l_Lean_Meta_Match_Pattern_applyFVarSubst_match__1(lean_object*);
|
||||
lean_object* l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___closed__6;
|
||||
lean_object* l_Lean_Meta_Match_Pattern_applyFVarSubst_match__2___rarg(lean_object*, lean_object*, lean_object*);
|
||||
extern lean_object* l_Lean_KernelException_toMessageData___closed__15;
|
||||
lean_object* l_Lean_Meta_Match_Alt_toMessageData___closed__1;
|
||||
|
|
@ -125,10 +130,12 @@ lean_object* l_Lean_LocalDecl_toExpr(lean_object*);
|
|||
lean_object* l_Lean_Meta_Match_instantiateAltLHSMVars(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_Match_Problem_toMessageData___lambda__1___closed__5;
|
||||
extern lean_object* l_instReprIterator___closed__2;
|
||||
lean_object* l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_List_map___at_Lean_Meta_Match_Example_replaceFVarId___spec__1(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_mkFVar(lean_object*);
|
||||
extern lean_object* l_Lean_MessageData_arrayExpr_toMessageData___closed__2;
|
||||
lean_object* l_Lean_replaceFVarIdAtLocalDecl(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___closed__1;
|
||||
lean_object* l_Lean_Meta_Match_counterExampleToMessageData(lean_object*);
|
||||
lean_object* l_Lean_Expr_replaceFVarId(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_Match_Pattern_toExpr_visit___closed__3;
|
||||
|
|
@ -146,7 +153,6 @@ lean_object* l_Lean_Meta_Match_Example_applyFVarSubst___boxed(lean_object*, lean
|
|||
lean_object* l_Lean_Meta_Match_Pattern_toMessageData___closed__2;
|
||||
lean_object* l_List_mapM___at_Lean_Meta_Match_Pattern_toExpr_visit___spec__1(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_List_redLength___rarg(lean_object*);
|
||||
lean_object* l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__6;
|
||||
lean_object* l_Lean_Meta_Match_instInhabitedPattern;
|
||||
lean_object* l_List_find_x3f___rarg(lean_object*, lean_object*);
|
||||
extern lean_object* l_Array_foldlMUnsafe_fold___at_Lean_withNestedTraces___spec__5___closed__1;
|
||||
|
|
@ -154,10 +160,10 @@ lean_object* l_Lean_Meta_Match_Alt_toMessageData(lean_object*, lean_object*, lea
|
|||
lean_object* l_List_map___at_Lean_Meta_Match_Alt_replaceFVarId___spec__3(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_List_foldl___at_Lean_Meta_Match_Example_toMessageData___spec__1___closed__1;
|
||||
lean_object* l_List_map___at_Lean_Meta_Match_Alt_applyFVarSubst___spec__1(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__4;
|
||||
lean_object* l_Lean_Meta_Match_Problem_toMessageData(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_Match_Pattern_applyFVarSubst(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_Match_Pattern_toExpr_visit_match__1(lean_object*);
|
||||
lean_object* l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
uint8_t l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__1(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_FVarSubst_insert(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_Match_Alt_replaceFVarId(lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -167,6 +173,7 @@ lean_object* l_List_map___at_Lean_Meta_Match_Example_replaceFVarId___spec__2(lea
|
|||
lean_object* l_Lean_Meta_Match_instInhabitedPattern___closed__1;
|
||||
lean_object* l_Lean_Meta_Match_Example_applyFVarSubst_match__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_Match_instantiatePatternMVars_match__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___closed__5;
|
||||
lean_object* l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
uint8_t l_Lean_Meta_Match_Pattern_hasExprMVar(lean_object*);
|
||||
lean_object* l_List_map___at_Lean_Meta_Match_Pattern_toMessageData___spec__2(lean_object*);
|
||||
|
|
@ -193,20 +200,19 @@ extern lean_object* l_prec_x28___x29___closed__7;
|
|||
lean_object* l_List_map___at_Lean_Meta_Match_Alt_applyFVarSubst___spec__1___boxed(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_indentD(lean_object*);
|
||||
lean_object* l_Lean_Meta_Match_examplesToMessageData(lean_object*);
|
||||
lean_object* l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__9;
|
||||
lean_object* l_Lean_Meta_withExistingLocalDecls___at_Lean_Meta_Match_Alt_toMessageData___spec__3(lean_object*);
|
||||
lean_object* l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__8;
|
||||
extern lean_object* l_prec_x28___x29___closed__3;
|
||||
lean_object* l_List_map___at_Lean_Meta_Match_Pattern_applyFVarSubst___spec__3(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_throwError___at_Lean_Meta_Match_Alt_checkAndReplaceFVarId___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___closed__3;
|
||||
lean_object* l_Lean_Meta_Match_Problem_toMessageData___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_Match_Problem_toMessageData___lambda__1___closed__1;
|
||||
lean_object* l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__7;
|
||||
lean_object* l_Lean_Meta_Match_Alt_checkAndReplaceFVarId_match__2___rarg(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_Match_Pattern_applyFVarSubst_match__2(lean_object*);
|
||||
lean_object* l_List_map___at_Lean_Meta_Match_Alt_replaceFVarId___spec__2(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_Match_Problem_toMessageData___lambda__1___closed__6;
|
||||
extern lean_object* l_Lean_MessageData_formatAux___closed__3;
|
||||
lean_object* l_Lean_Meta_Match_Alt_checkAndReplaceFVarId_match__1___rarg(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_Match_Alt_checkAndReplaceFVarId_match__1___rarg(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_indentExpr(lean_object*);
|
||||
lean_object* l_Lean_Meta_Match_instInhabitedProblem;
|
||||
lean_object* l_List_foldl___at_Lean_Meta_Match_Pattern_toMessageData___spec__1___closed__1;
|
||||
|
|
@ -217,7 +223,6 @@ lean_object* l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__2;
|
|||
lean_object* l_Lean_Meta_Match_counterExamplesToMessageData(lean_object*);
|
||||
lean_object* l_Lean_Meta_Match_Example_toMessageData___closed__1;
|
||||
lean_object* l_List_foldr___at_Lean_Meta_Match_Pattern_hasExprMVar___spec__1___boxed(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__5;
|
||||
lean_object* l_Lean_Meta_Match_Alt_applyFVarSubst(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__3;
|
||||
lean_object* l_List_map___at_Lean_Meta_Match_Example_replaceFVarId___spec__2___boxed(lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -4948,7 +4953,28 @@ lean_dec(x_2);
|
|||
return x_4;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Meta_Match_Alt_checkAndReplaceFVarId_match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
|
||||
lean_object* l_Lean_Meta_Match_Alt_checkAndReplaceFVarId_match__1___rarg(lean_object* x_1, lean_object* x_2) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_3; lean_object* x_4; lean_object* x_5;
|
||||
x_3 = lean_ctor_get(x_1, 0);
|
||||
lean_inc(x_3);
|
||||
x_4 = lean_ctor_get(x_1, 1);
|
||||
lean_inc(x_4);
|
||||
lean_dec(x_1);
|
||||
x_5 = lean_apply_2(x_2, x_3, x_4);
|
||||
return x_5;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Meta_Match_Alt_checkAndReplaceFVarId_match__1(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_2;
|
||||
x_2 = lean_alloc_closure((void*)(l_Lean_Meta_Match_Alt_checkAndReplaceFVarId_match__1___rarg), 2, 0);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Meta_Match_Alt_checkAndReplaceFVarId_match__2___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
|
||||
_start:
|
||||
{
|
||||
if (lean_obj_tag(x_1) == 0)
|
||||
|
|
@ -4971,11 +4997,11 @@ return x_7;
|
|||
}
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Meta_Match_Alt_checkAndReplaceFVarId_match__1(lean_object* x_1) {
|
||||
lean_object* l_Lean_Meta_Match_Alt_checkAndReplaceFVarId_match__2(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_2;
|
||||
x_2 = lean_alloc_closure((void*)(l_Lean_Meta_Match_Alt_checkAndReplaceFVarId_match__1___rarg), 3, 0);
|
||||
x_2 = lean_alloc_closure((void*)(l_Lean_Meta_Match_Alt_checkAndReplaceFVarId_match__2___rarg), 3, 0);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
|
|
@ -5132,6 +5158,99 @@ lean_ctor_set(x_11, 1, x_9);
|
|||
return x_11;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___closed__1() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_mk_string("type mismatch during dependent match-elimination at pattern variable '");
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___closed__2() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2;
|
||||
x_1 = l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___closed__1;
|
||||
x_2 = l_Lean_stringToMessageData(x_1);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___closed__3() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_mk_string("' with type");
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___closed__4() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2;
|
||||
x_1 = l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___closed__3;
|
||||
x_2 = l_Lean_stringToMessageData(x_1);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___closed__5() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_mk_string("\nexpected type");
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___closed__6() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2;
|
||||
x_1 = l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___closed__5;
|
||||
x_2 = l_Lean_stringToMessageData(x_1);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27;
|
||||
x_9 = lean_ctor_get(x_3, 0);
|
||||
lean_inc(x_9);
|
||||
x_10 = lean_ctor_get(x_3, 1);
|
||||
lean_inc(x_10);
|
||||
lean_dec(x_3);
|
||||
x_11 = lean_ctor_get(x_1, 0);
|
||||
x_12 = l_Lean_LocalDecl_fvarId(x_2);
|
||||
x_13 = l_Lean_mkFVar(x_12);
|
||||
x_14 = lean_alloc_ctor(2, 1, 0);
|
||||
lean_ctor_set(x_14, 0, x_13);
|
||||
x_15 = l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___closed__2;
|
||||
x_16 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_16, 0, x_15);
|
||||
lean_ctor_set(x_16, 1, x_14);
|
||||
x_17 = l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___closed__4;
|
||||
x_18 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_18, 0, x_16);
|
||||
lean_ctor_set(x_18, 1, x_17);
|
||||
x_19 = l_Lean_indentExpr(x_10);
|
||||
x_20 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_20, 0, x_18);
|
||||
lean_ctor_set(x_20, 1, x_19);
|
||||
x_21 = l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___closed__6;
|
||||
x_22 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_22, 0, x_20);
|
||||
lean_ctor_set(x_22, 1, x_21);
|
||||
x_23 = l_Lean_indentExpr(x_9);
|
||||
x_24 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_24, 0, x_22);
|
||||
lean_ctor_set(x_24, 1, x_23);
|
||||
x_25 = l_Lean_KernelException_toMessageData___closed__15;
|
||||
x_26 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_26, 0, x_24);
|
||||
lean_ctor_set(x_26, 1, x_25);
|
||||
x_27 = l_Lean_throwErrorAt___at_Lean_Meta_Match_Alt_checkAndReplaceFVarId___spec__3(x_11, x_26, x_4, x_5, x_6, x_7, x_8);
|
||||
return x_27;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__1() {
|
||||
_start:
|
||||
{
|
||||
|
|
@ -5160,57 +5279,6 @@ lean_ctor_set(x_2, 0, x_1);
|
|||
return x_2;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__4() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_mk_string("type mismatch during dependent match-elimination at pattern variable '");
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__5() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2;
|
||||
x_1 = l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__4;
|
||||
x_2 = l_Lean_stringToMessageData(x_1);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__6() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_mk_string("' with type");
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__7() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2;
|
||||
x_1 = l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__6;
|
||||
x_2 = l_Lean_stringToMessageData(x_1);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__8() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_mk_string("\nexpected type");
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__9() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2;
|
||||
x_1 = l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__8;
|
||||
x_2 = l_Lean_stringToMessageData(x_1);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Meta_Match_Alt_checkAndReplaceFVarId(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) {
|
||||
_start:
|
||||
{
|
||||
|
|
@ -5276,68 +5344,44 @@ x_22 = lean_unbox(x_21);
|
|||
lean_dec(x_21);
|
||||
if (x_22 == 0)
|
||||
{
|
||||
lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41;
|
||||
lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27;
|
||||
x_23 = lean_ctor_get(x_20, 1);
|
||||
lean_inc(x_23);
|
||||
lean_dec(x_20);
|
||||
x_24 = lean_ctor_get(x_3, 0);
|
||||
lean_inc(x_24);
|
||||
x_25 = l_Lean_LocalDecl_fvarId(x_15);
|
||||
lean_dec(x_15);
|
||||
x_26 = l_Lean_mkFVar(x_25);
|
||||
x_27 = lean_alloc_ctor(2, 1, 0);
|
||||
lean_ctor_set(x_27, 0, x_26);
|
||||
x_28 = l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__5;
|
||||
x_29 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_29, 0, x_28);
|
||||
lean_ctor_set(x_29, 1, x_27);
|
||||
x_30 = l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__7;
|
||||
x_31 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_31, 0, x_29);
|
||||
lean_ctor_set(x_31, 1, x_30);
|
||||
x_32 = l_Lean_indentExpr(x_19);
|
||||
x_33 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_33, 0, x_31);
|
||||
lean_ctor_set(x_33, 1, x_32);
|
||||
x_34 = l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__9;
|
||||
x_35 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_35, 0, x_33);
|
||||
lean_ctor_set(x_35, 1, x_34);
|
||||
x_36 = l_Lean_indentExpr(x_17);
|
||||
x_37 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_37, 0, x_35);
|
||||
lean_ctor_set(x_37, 1, x_36);
|
||||
x_38 = l_Lean_KernelException_toMessageData___closed__15;
|
||||
x_39 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_39, 0, x_37);
|
||||
lean_ctor_set(x_39, 1, x_38);
|
||||
x_40 = lean_alloc_closure((void*)(l_Lean_throwErrorAt___at_Lean_Meta_Match_Alt_checkAndReplaceFVarId___spec__3___boxed), 7, 2);
|
||||
lean_closure_set(x_40, 0, x_24);
|
||||
lean_closure_set(x_40, 1, x_39);
|
||||
x_24 = lean_alloc_closure((void*)(l_Lean_Meta_addPPExplicitToExposeDiff), 7, 2);
|
||||
lean_closure_set(x_24, 0, x_17);
|
||||
lean_closure_set(x_24, 1, x_19);
|
||||
lean_inc(x_3);
|
||||
x_25 = lean_alloc_closure((void*)(l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___boxed), 8, 2);
|
||||
lean_closure_set(x_25, 0, x_3);
|
||||
lean_closure_set(x_25, 1, x_15);
|
||||
x_26 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Meta_instMonadLCtxMetaM___spec__2___rarg), 7, 2);
|
||||
lean_closure_set(x_26, 0, x_24);
|
||||
lean_closure_set(x_26, 1, x_25);
|
||||
lean_inc(x_7);
|
||||
lean_inc(x_6);
|
||||
lean_inc(x_5);
|
||||
lean_inc(x_4);
|
||||
x_41 = l_Lean_Meta_withExistingLocalDecls___at_Lean_Meta_Match_Alt_toMessageData___spec__3___rarg(x_10, x_40, x_4, x_5, x_6, x_7, x_23);
|
||||
if (lean_obj_tag(x_41) == 0)
|
||||
x_27 = l_Lean_Meta_withExistingLocalDecls___at_Lean_Meta_Match_Alt_toMessageData___spec__3___rarg(x_10, x_26, x_4, x_5, x_6, x_7, x_23);
|
||||
if (lean_obj_tag(x_27) == 0)
|
||||
{
|
||||
lean_object* x_42; lean_object* x_43; lean_object* x_44;
|
||||
x_42 = lean_ctor_get(x_41, 0);
|
||||
lean_inc(x_42);
|
||||
x_43 = lean_ctor_get(x_41, 1);
|
||||
lean_inc(x_43);
|
||||
lean_dec(x_41);
|
||||
x_44 = l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__2(x_1, x_2, x_3, x_42, x_4, x_5, x_6, x_7, x_43);
|
||||
lean_object* x_28; lean_object* x_29; lean_object* x_30;
|
||||
x_28 = lean_ctor_get(x_27, 0);
|
||||
lean_inc(x_28);
|
||||
x_29 = lean_ctor_get(x_27, 1);
|
||||
lean_inc(x_29);
|
||||
lean_dec(x_27);
|
||||
x_30 = l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__2(x_1, x_2, x_3, x_28, x_4, x_5, x_6, x_7, x_29);
|
||||
lean_dec(x_7);
|
||||
lean_dec(x_6);
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_42);
|
||||
return x_44;
|
||||
lean_dec(x_28);
|
||||
return x_30;
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_45;
|
||||
uint8_t x_31;
|
||||
lean_dec(x_7);
|
||||
lean_dec(x_6);
|
||||
lean_dec(x_5);
|
||||
|
|
@ -5345,48 +5389,48 @@ lean_dec(x_4);
|
|||
lean_dec(x_3);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
x_45 = !lean_is_exclusive(x_41);
|
||||
if (x_45 == 0)
|
||||
x_31 = !lean_is_exclusive(x_27);
|
||||
if (x_31 == 0)
|
||||
{
|
||||
return x_41;
|
||||
return x_27;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_46; lean_object* x_47; lean_object* x_48;
|
||||
x_46 = lean_ctor_get(x_41, 0);
|
||||
x_47 = lean_ctor_get(x_41, 1);
|
||||
lean_inc(x_47);
|
||||
lean_inc(x_46);
|
||||
lean_dec(x_41);
|
||||
x_48 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_48, 0, x_46);
|
||||
lean_ctor_set(x_48, 1, x_47);
|
||||
return x_48;
|
||||
lean_object* x_32; lean_object* x_33; lean_object* x_34;
|
||||
x_32 = lean_ctor_get(x_27, 0);
|
||||
x_33 = lean_ctor_get(x_27, 1);
|
||||
lean_inc(x_33);
|
||||
lean_inc(x_32);
|
||||
lean_dec(x_27);
|
||||
x_34 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_34, 0, x_32);
|
||||
lean_ctor_set(x_34, 1, x_33);
|
||||
return x_34;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_49; lean_object* x_50; lean_object* x_51;
|
||||
lean_object* x_35; lean_object* x_36; lean_object* x_37;
|
||||
lean_dec(x_19);
|
||||
lean_dec(x_17);
|
||||
lean_dec(x_15);
|
||||
lean_dec(x_10);
|
||||
x_49 = lean_ctor_get(x_20, 1);
|
||||
lean_inc(x_49);
|
||||
x_35 = lean_ctor_get(x_20, 1);
|
||||
lean_inc(x_35);
|
||||
lean_dec(x_20);
|
||||
x_50 = lean_box(0);
|
||||
x_51 = l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__2(x_1, x_2, x_3, x_50, x_4, x_5, x_6, x_7, x_49);
|
||||
x_36 = lean_box(0);
|
||||
x_37 = l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__2(x_1, x_2, x_3, x_36, x_4, x_5, x_6, x_7, x_35);
|
||||
lean_dec(x_7);
|
||||
lean_dec(x_6);
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_4);
|
||||
return x_51;
|
||||
return x_37;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_52;
|
||||
uint8_t x_38;
|
||||
lean_dec(x_19);
|
||||
lean_dec(x_17);
|
||||
lean_dec(x_15);
|
||||
|
|
@ -5398,29 +5442,29 @@ lean_dec(x_4);
|
|||
lean_dec(x_3);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
x_52 = !lean_is_exclusive(x_20);
|
||||
if (x_52 == 0)
|
||||
x_38 = !lean_is_exclusive(x_20);
|
||||
if (x_38 == 0)
|
||||
{
|
||||
return x_20;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_53; lean_object* x_54; lean_object* x_55;
|
||||
x_53 = lean_ctor_get(x_20, 0);
|
||||
x_54 = lean_ctor_get(x_20, 1);
|
||||
lean_inc(x_54);
|
||||
lean_inc(x_53);
|
||||
lean_object* x_39; lean_object* x_40; lean_object* x_41;
|
||||
x_39 = lean_ctor_get(x_20, 0);
|
||||
x_40 = lean_ctor_get(x_20, 1);
|
||||
lean_inc(x_40);
|
||||
lean_inc(x_39);
|
||||
lean_dec(x_20);
|
||||
x_55 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_55, 0, x_53);
|
||||
lean_ctor_set(x_55, 1, x_54);
|
||||
return x_55;
|
||||
x_41 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_41, 0, x_39);
|
||||
lean_ctor_set(x_41, 1, x_40);
|
||||
return x_41;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_56;
|
||||
uint8_t x_42;
|
||||
lean_dec(x_15);
|
||||
lean_dec(x_10);
|
||||
lean_dec(x_7);
|
||||
|
|
@ -5430,23 +5474,23 @@ lean_dec(x_4);
|
|||
lean_dec(x_3);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
x_56 = !lean_is_exclusive(x_16);
|
||||
if (x_56 == 0)
|
||||
x_42 = !lean_is_exclusive(x_16);
|
||||
if (x_42 == 0)
|
||||
{
|
||||
return x_16;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_57; lean_object* x_58; lean_object* x_59;
|
||||
x_57 = lean_ctor_get(x_16, 0);
|
||||
x_58 = lean_ctor_get(x_16, 1);
|
||||
lean_inc(x_58);
|
||||
lean_inc(x_57);
|
||||
lean_object* x_43; lean_object* x_44; lean_object* x_45;
|
||||
x_43 = lean_ctor_get(x_16, 0);
|
||||
x_44 = lean_ctor_get(x_16, 1);
|
||||
lean_inc(x_44);
|
||||
lean_inc(x_43);
|
||||
lean_dec(x_16);
|
||||
x_59 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_59, 0, x_57);
|
||||
lean_ctor_set(x_59, 1, x_58);
|
||||
return x_59;
|
||||
x_45 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_45, 0, x_43);
|
||||
lean_ctor_set(x_45, 1, x_44);
|
||||
return x_45;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -5512,6 +5556,19 @@ lean_dec(x_4);
|
|||
return x_10;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_9;
|
||||
x_9 = l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8);
|
||||
lean_dec(x_7);
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
return x_9;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Meta_Match_Example_replaceFVarId_match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
|
||||
_start:
|
||||
{
|
||||
|
|
@ -7459,6 +7516,7 @@ return x_4;
|
|||
}
|
||||
}
|
||||
lean_object* initialize_Init(lean_object*);
|
||||
lean_object* initialize_Lean_Meta_Check(lean_object*);
|
||||
lean_object* initialize_Lean_Meta_Match_MatcherInfo(lean_object*);
|
||||
lean_object* initialize_Lean_Meta_Match_CaseArraySizes(lean_object*);
|
||||
static bool _G_initialized = false;
|
||||
|
|
@ -7469,6 +7527,9 @@ _G_initialized = true;
|
|||
res = initialize_Init(lean_io_mk_world());
|
||||
if (lean_io_result_is_error(res)) return res;
|
||||
lean_dec_ref(res);
|
||||
res = initialize_Lean_Meta_Check(lean_io_mk_world());
|
||||
if (lean_io_result_is_error(res)) return res;
|
||||
lean_dec_ref(res);
|
||||
res = initialize_Lean_Meta_Match_MatcherInfo(lean_io_mk_world());
|
||||
if (lean_io_result_is_error(res)) return res;
|
||||
lean_dec_ref(res);
|
||||
|
|
@ -7517,24 +7578,24 @@ l_Lean_Meta_Match_Alt_toMessageData___closed__2 = _init_l_Lean_Meta_Match_Alt_to
|
|||
lean_mark_persistent(l_Lean_Meta_Match_Alt_toMessageData___closed__2);
|
||||
l_Lean_Meta_Match_Alt_toMessageData___closed__3 = _init_l_Lean_Meta_Match_Alt_toMessageData___closed__3();
|
||||
lean_mark_persistent(l_Lean_Meta_Match_Alt_toMessageData___closed__3);
|
||||
l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___closed__1 = _init_l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___closed__1();
|
||||
lean_mark_persistent(l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___closed__1);
|
||||
l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___closed__2 = _init_l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___closed__2();
|
||||
lean_mark_persistent(l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___closed__2);
|
||||
l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___closed__3 = _init_l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___closed__3();
|
||||
lean_mark_persistent(l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___closed__3);
|
||||
l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___closed__4 = _init_l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___closed__4();
|
||||
lean_mark_persistent(l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___closed__4);
|
||||
l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___closed__5 = _init_l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___closed__5();
|
||||
lean_mark_persistent(l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___closed__5);
|
||||
l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___closed__6 = _init_l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___closed__6();
|
||||
lean_mark_persistent(l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___lambda__3___closed__6);
|
||||
l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__1 = _init_l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__1();
|
||||
lean_mark_persistent(l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__1);
|
||||
l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__2 = _init_l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__2();
|
||||
lean_mark_persistent(l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__2);
|
||||
l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__3 = _init_l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__3();
|
||||
lean_mark_persistent(l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__3);
|
||||
l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__4 = _init_l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__4();
|
||||
lean_mark_persistent(l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__4);
|
||||
l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__5 = _init_l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__5();
|
||||
lean_mark_persistent(l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__5);
|
||||
l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__6 = _init_l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__6();
|
||||
lean_mark_persistent(l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__6);
|
||||
l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__7 = _init_l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__7();
|
||||
lean_mark_persistent(l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__7);
|
||||
l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__8 = _init_l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__8();
|
||||
lean_mark_persistent(l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__8);
|
||||
l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__9 = _init_l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__9();
|
||||
lean_mark_persistent(l_Lean_Meta_Match_Alt_checkAndReplaceFVarId___closed__9);
|
||||
l_List_foldl___at_Lean_Meta_Match_Example_toMessageData___spec__1___closed__1 = _init_l_List_foldl___at_Lean_Meta_Match_Example_toMessageData___spec__1___closed__1();
|
||||
lean_mark_persistent(l_List_foldl___at_Lean_Meta_Match_Example_toMessageData___spec__1___closed__1);
|
||||
l_Lean_Meta_Match_Example_toMessageData___closed__1 = _init_l_Lean_Meta_Match_Example_toMessageData___closed__1();
|
||||
|
|
|
|||
1244
stage0/stdlib/Lean/Meta/Tactic/Injection.c
generated
1244
stage0/stdlib/Lean/Meta/Tactic/Injection.c
generated
File diff suppressed because it is too large
Load diff
860
stage0/stdlib/Lean/Meta/Tactic/Subst.c
generated
860
stage0/stdlib/Lean/Meta/Tactic/Subst.c
generated
File diff suppressed because it is too large
Load diff
1586
stage0/stdlib/Lean/Parser/Transform.c
generated
Normal file
1586
stage0/stdlib/Lean/Parser/Transform.c
generated
Normal file
File diff suppressed because it is too large
Load diff
36
stage0/stdlib/Lean/PrettyPrinter/Delaborator/Basic.c
generated
36
stage0/stdlib/Lean/PrettyPrinter/Delaborator/Basic.c
generated
|
|
@ -119,11 +119,11 @@ lean_object* l_Lean_PrettyPrinter_Delaborator_instMonadQuotationDelabM___closed_
|
|||
lean_object* l_Lean_PrettyPrinter_Delaborator_failure(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* lean_array_fget(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_PrettyPrinter_Delaborator_withBindingDomain___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
extern lean_object* l_myMacro____x40_Init_NotationExtra___hyg_3477____closed__43;
|
||||
uint8_t lean_nat_dec_eq(lean_object*, lean_object*);
|
||||
extern lean_object* l_Lean_PrettyPrinter_Formatter_categoryParser_formatter___lambda__2___closed__4;
|
||||
lean_object* l_Lean_PrettyPrinter_Delaborator_annotateCurPos(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_PrettyPrinter_Delaborator_Context_pos___default;
|
||||
extern lean_object* l_Lean_Meta_addPPExplicitToExposeDiff___closed__2;
|
||||
lean_object* l_Lean_Level_quote___lambda__6(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
extern lean_object* l_Lean_Level_LevelToFormat_Result_format___closed__3;
|
||||
extern lean_object* l_Lean_numLitKind;
|
||||
|
|
@ -183,6 +183,7 @@ lean_object* l_Lean_PrettyPrinter_Delaborator_initFn____x40_Lean_PrettyPrinter_D
|
|||
lean_object* l_Lean_PrettyPrinter_Delaborator_getExprKind___closed__3;
|
||||
lean_object* l_Lean_PrettyPrinter_Delaborator_mkDelabAttribute___closed__9;
|
||||
extern lean_object* l_Lean_Unhygienic_instMonadQuotationUnhygienic___closed__4;
|
||||
extern lean_object* l_Lean_Meta_addPPExplicitToExposeDiff___closed__3;
|
||||
lean_object* l_Lean_PrettyPrinter_Delaborator_withAppFnArgs_match__2(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_PrettyPrinter_Delaborator_getExprKind_match__2(lean_object*);
|
||||
lean_object* l_Lean_PrettyPrinter_Delaborator_withMDataExpr___rarg___closed__2;
|
||||
|
|
@ -204,7 +205,6 @@ extern lean_object* l_Lean_Format_getUnicode___closed__1;
|
|||
lean_object* l_Lean_Level_quote___lambda__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_PrettyPrinter_Delaborator_withAppArg_match__1(lean_object*);
|
||||
lean_object* l_Lean_PrettyPrinter_Delaborator_descend___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
extern lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___spec__3___closed__3;
|
||||
extern lean_object* l_Lean_PrettyPrinter_mkFormatterAttribute___closed__6;
|
||||
uint8_t l_Lean_getPPStructureInstances(lean_object*);
|
||||
lean_object* l_Lean_PrettyPrinter_Delaborator_getExprKind___closed__10;
|
||||
|
|
@ -275,7 +275,6 @@ lean_object* l_Lean_Level_quote___lambda__1(lean_object*, lean_object*, lean_obj
|
|||
lean_object* lean_register_option(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_ReaderT_bind___at_Lean_PrettyPrinter_Parenthesizer_term_parenthesizer___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Std_PersistentHashMap_findAtAux___at_Lean_PrettyPrinter_Delaborator_delabFor___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_getPPAll___closed__1;
|
||||
lean_object* l_Lean_getPPStructureInstances___boxed(lean_object*);
|
||||
lean_object* l_Lean_getPPUniverses___closed__1;
|
||||
lean_object* l_Lean_getPPUniverses___boxed(lean_object*);
|
||||
|
|
@ -300,7 +299,6 @@ lean_object* l_Lean_PrettyPrinter_Delaborator_appUnexpanderAttribute;
|
|||
lean_object* l_Lean_PrettyPrinter_Delaborator_withAppFnArgs(lean_object*);
|
||||
lean_object* l_Lean_getPPNotation___closed__2;
|
||||
lean_object* l_Lean_initFn____x40_Lean_PrettyPrinter_Delaborator_Basic___hyg_554____closed__2;
|
||||
lean_object* l_Lean_getPPExplicit___closed__1;
|
||||
lean_object* l_Std_PersistentHashMap_findAtAux___at_Lean_PrettyPrinter_Delaborator_delabFor___spec__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_initFn____x40_Lean_PrettyPrinter_Delaborator_Basic___hyg_554____closed__1;
|
||||
lean_object* l_Lean_PrettyPrinter_Delaborator_instInhabitedDelabM(lean_object*);
|
||||
|
|
@ -1153,21 +1151,11 @@ x_3 = lean_box(x_2);
|
|||
return x_3;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_getPPExplicit___closed__1() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3;
|
||||
x_1 = l_Lean_getSanitizeNames___closed__2;
|
||||
x_2 = l_myMacro____x40_Init_NotationExtra___hyg_3477____closed__43;
|
||||
x_3 = lean_name_mk_string(x_1, x_2);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
uint8_t l_Lean_getPPExplicit(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_2; uint8_t x_3; uint8_t x_4;
|
||||
x_2 = l_Lean_getPPExplicit___closed__1;
|
||||
x_2 = l_Lean_Meta_addPPExplicitToExposeDiff___closed__3;
|
||||
x_3 = 0;
|
||||
x_4 = l_Lean_KVMap_getBool(x_1, x_2, x_3);
|
||||
return x_4;
|
||||
|
|
@ -1479,21 +1467,11 @@ x_3 = lean_box(x_2);
|
|||
return x_3;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_getPPAll___closed__1() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3;
|
||||
x_1 = l_Lean_getSanitizeNames___closed__2;
|
||||
x_2 = l_Array_forInUnsafe_loop___at___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___spec__3___closed__3;
|
||||
x_3 = lean_name_mk_string(x_1, x_2);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
uint8_t l_Lean_getPPAll(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_2; uint8_t x_3; uint8_t x_4;
|
||||
x_2 = l_Lean_getPPAll___closed__1;
|
||||
x_2 = l_Lean_Meta_addPPExplicitToExposeDiff___closed__2;
|
||||
x_3 = 0;
|
||||
x_4 = l_Lean_KVMap_getBool(x_1, x_2, x_3);
|
||||
return x_4;
|
||||
|
|
@ -1557,7 +1535,7 @@ lean_object* l_Lean_initFn____x40_Lean_PrettyPrinter_Delaborator_Basic___hyg_554
|
|||
_start:
|
||||
{
|
||||
lean_object* x_2; lean_object* x_3; lean_object* x_4;
|
||||
x_2 = l_Lean_getPPExplicit___closed__1;
|
||||
x_2 = l_Lean_Meta_addPPExplicitToExposeDiff___closed__3;
|
||||
x_3 = l_Lean_initFn____x40_Lean_PrettyPrinter_Delaborator_Basic___hyg_554____closed__2;
|
||||
x_4 = lean_register_option(x_2, x_3, x_1);
|
||||
if (lean_obj_tag(x_4) == 0)
|
||||
|
|
@ -10504,8 +10482,6 @@ l_Lean_getPPCoercions___closed__1 = _init_l_Lean_getPPCoercions___closed__1();
|
|||
lean_mark_persistent(l_Lean_getPPCoercions___closed__1);
|
||||
l_Lean_getPPCoercions___closed__2 = _init_l_Lean_getPPCoercions___closed__2();
|
||||
lean_mark_persistent(l_Lean_getPPCoercions___closed__2);
|
||||
l_Lean_getPPExplicit___closed__1 = _init_l_Lean_getPPExplicit___closed__1();
|
||||
lean_mark_persistent(l_Lean_getPPExplicit___closed__1);
|
||||
l_Lean_getPPNotation___closed__1 = _init_l_Lean_getPPNotation___closed__1();
|
||||
lean_mark_persistent(l_Lean_getPPNotation___closed__1);
|
||||
l_Lean_getPPNotation___closed__2 = _init_l_Lean_getPPNotation___closed__2();
|
||||
|
|
@ -10536,8 +10512,6 @@ l_Lean_getPPPrivateNames___closed__2 = _init_l_Lean_getPPPrivateNames___closed__
|
|||
lean_mark_persistent(l_Lean_getPPPrivateNames___closed__2);
|
||||
l_Lean_getPPUnicode___closed__1 = _init_l_Lean_getPPUnicode___closed__1();
|
||||
lean_mark_persistent(l_Lean_getPPUnicode___closed__1);
|
||||
l_Lean_getPPAll___closed__1 = _init_l_Lean_getPPAll___closed__1();
|
||||
lean_mark_persistent(l_Lean_getPPAll___closed__1);
|
||||
l_Lean_initFn____x40_Lean_PrettyPrinter_Delaborator_Basic___hyg_554____closed__1 = _init_l_Lean_initFn____x40_Lean_PrettyPrinter_Delaborator_Basic___hyg_554____closed__1();
|
||||
lean_mark_persistent(l_Lean_initFn____x40_Lean_PrettyPrinter_Delaborator_Basic___hyg_554____closed__1);
|
||||
l_Lean_initFn____x40_Lean_PrettyPrinter_Delaborator_Basic___hyg_554____closed__2 = _init_l_Lean_initFn____x40_Lean_PrettyPrinter_Delaborator_Basic___hyg_554____closed__2();
|
||||
|
|
|
|||
330
stage0/stdlib/Lean/Server/ServerBin.c
generated
Normal file
330
stage0/stdlib/Lean/Server/ServerBin.c
generated
Normal file
|
|
@ -0,0 +1,330 @@
|
|||
// Lean compiler output
|
||||
// Module: Lean.Server.ServerBin
|
||||
// Imports: Init Init.System.IO Lean.Server
|
||||
#include <lean/lean.h>
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic ignored "-Wunused-parameter"
|
||||
#pragma clang diagnostic ignored "-Wunused-label"
|
||||
#elif defined(__GNUC__) && !defined(__CLANG__)
|
||||
#pragma GCC diagnostic ignored "-Wunused-parameter"
|
||||
#pragma GCC diagnostic ignored "-Wunused-label"
|
||||
#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
|
||||
#endif
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
lean_object* lean_get_stdin(lean_object*);
|
||||
lean_object* lean_io_error_to_string(lean_object*);
|
||||
lean_object* _lean_main(lean_object*, lean_object*);
|
||||
lean_object* lean_get_stderr(lean_object*);
|
||||
lean_object* l_main___boxed__const__1;
|
||||
lean_object* l_IO_getStdin___at_main___spec__1(lean_object*);
|
||||
lean_object* lean_init_search_path(lean_object*, lean_object*);
|
||||
lean_object* lean_get_stdout(lean_object*);
|
||||
lean_object* l_IO_FS_Stream_putStrLn___at_Lean_Server_Test_runWithInputFile___spec__1(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Server_initAndRunServer(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_IO_getStdin___at_main___spec__1(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_2;
|
||||
x_2 = lean_get_stdin(x_1);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_main___boxed__const__1() {
|
||||
_start:
|
||||
{
|
||||
uint32_t x_1; lean_object* x_2;
|
||||
x_1 = 0;
|
||||
x_2 = lean_box_uint32(x_1);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
lean_object* _lean_main(lean_object* x_1, lean_object* x_2) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_3;
|
||||
lean_dec(x_1);
|
||||
x_3 = lean_get_stdin(x_2);
|
||||
if (lean_obj_tag(x_3) == 0)
|
||||
{
|
||||
lean_object* x_4; lean_object* x_5; lean_object* x_6;
|
||||
x_4 = lean_ctor_get(x_3, 0);
|
||||
lean_inc(x_4);
|
||||
x_5 = lean_ctor_get(x_3, 1);
|
||||
lean_inc(x_5);
|
||||
lean_dec(x_3);
|
||||
x_6 = lean_get_stdout(x_5);
|
||||
if (lean_obj_tag(x_6) == 0)
|
||||
{
|
||||
lean_object* x_7; lean_object* x_8; lean_object* x_9;
|
||||
x_7 = lean_ctor_get(x_6, 0);
|
||||
lean_inc(x_7);
|
||||
x_8 = lean_ctor_get(x_6, 1);
|
||||
lean_inc(x_8);
|
||||
lean_dec(x_6);
|
||||
x_9 = lean_get_stderr(x_8);
|
||||
if (lean_obj_tag(x_9) == 0)
|
||||
{
|
||||
lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13;
|
||||
x_10 = lean_ctor_get(x_9, 0);
|
||||
lean_inc(x_10);
|
||||
x_11 = lean_ctor_get(x_9, 1);
|
||||
lean_inc(x_11);
|
||||
lean_dec(x_9);
|
||||
x_12 = lean_box(0);
|
||||
x_13 = lean_init_search_path(x_12, x_11);
|
||||
if (lean_obj_tag(x_13) == 0)
|
||||
{
|
||||
lean_object* x_14; lean_object* x_15;
|
||||
x_14 = lean_ctor_get(x_13, 1);
|
||||
lean_inc(x_14);
|
||||
lean_dec(x_13);
|
||||
x_15 = l_Lean_Server_initAndRunServer(x_4, x_7, x_14);
|
||||
if (lean_obj_tag(x_15) == 0)
|
||||
{
|
||||
uint8_t x_16;
|
||||
lean_dec(x_10);
|
||||
x_16 = !lean_is_exclusive(x_15);
|
||||
if (x_16 == 0)
|
||||
{
|
||||
lean_object* x_17; lean_object* x_18;
|
||||
x_17 = lean_ctor_get(x_15, 0);
|
||||
lean_dec(x_17);
|
||||
x_18 = l_main___boxed__const__1;
|
||||
lean_ctor_set(x_15, 0, x_18);
|
||||
return x_15;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_19; lean_object* x_20; lean_object* x_21;
|
||||
x_19 = lean_ctor_get(x_15, 1);
|
||||
lean_inc(x_19);
|
||||
lean_dec(x_15);
|
||||
x_20 = l_main___boxed__const__1;
|
||||
x_21 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_21, 0, x_20);
|
||||
lean_ctor_set(x_21, 1, x_19);
|
||||
return x_21;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25;
|
||||
x_22 = lean_ctor_get(x_15, 0);
|
||||
lean_inc(x_22);
|
||||
x_23 = lean_ctor_get(x_15, 1);
|
||||
lean_inc(x_23);
|
||||
lean_dec(x_15);
|
||||
x_24 = lean_io_error_to_string(x_22);
|
||||
x_25 = l_IO_FS_Stream_putStrLn___at_Lean_Server_Test_runWithInputFile___spec__1(x_10, x_24, x_23);
|
||||
if (lean_obj_tag(x_25) == 0)
|
||||
{
|
||||
uint8_t x_26;
|
||||
x_26 = !lean_is_exclusive(x_25);
|
||||
if (x_26 == 0)
|
||||
{
|
||||
lean_object* x_27; lean_object* x_28;
|
||||
x_27 = lean_ctor_get(x_25, 0);
|
||||
lean_dec(x_27);
|
||||
x_28 = l_main___boxed__const__1;
|
||||
lean_ctor_set(x_25, 0, x_28);
|
||||
return x_25;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_29; lean_object* x_30; lean_object* x_31;
|
||||
x_29 = lean_ctor_get(x_25, 1);
|
||||
lean_inc(x_29);
|
||||
lean_dec(x_25);
|
||||
x_30 = l_main___boxed__const__1;
|
||||
x_31 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_31, 0, x_30);
|
||||
lean_ctor_set(x_31, 1, x_29);
|
||||
return x_31;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_32;
|
||||
x_32 = !lean_is_exclusive(x_25);
|
||||
if (x_32 == 0)
|
||||
{
|
||||
return x_25;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_33; lean_object* x_34; lean_object* x_35;
|
||||
x_33 = lean_ctor_get(x_25, 0);
|
||||
x_34 = lean_ctor_get(x_25, 1);
|
||||
lean_inc(x_34);
|
||||
lean_inc(x_33);
|
||||
lean_dec(x_25);
|
||||
x_35 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_35, 0, x_33);
|
||||
lean_ctor_set(x_35, 1, x_34);
|
||||
return x_35;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_36;
|
||||
lean_dec(x_10);
|
||||
lean_dec(x_7);
|
||||
lean_dec(x_4);
|
||||
x_36 = !lean_is_exclusive(x_13);
|
||||
if (x_36 == 0)
|
||||
{
|
||||
return x_13;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_37; lean_object* x_38; lean_object* x_39;
|
||||
x_37 = lean_ctor_get(x_13, 0);
|
||||
x_38 = lean_ctor_get(x_13, 1);
|
||||
lean_inc(x_38);
|
||||
lean_inc(x_37);
|
||||
lean_dec(x_13);
|
||||
x_39 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_39, 0, x_37);
|
||||
lean_ctor_set(x_39, 1, x_38);
|
||||
return x_39;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_40;
|
||||
lean_dec(x_7);
|
||||
lean_dec(x_4);
|
||||
x_40 = !lean_is_exclusive(x_9);
|
||||
if (x_40 == 0)
|
||||
{
|
||||
return x_9;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_41; lean_object* x_42; lean_object* x_43;
|
||||
x_41 = lean_ctor_get(x_9, 0);
|
||||
x_42 = lean_ctor_get(x_9, 1);
|
||||
lean_inc(x_42);
|
||||
lean_inc(x_41);
|
||||
lean_dec(x_9);
|
||||
x_43 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_43, 0, x_41);
|
||||
lean_ctor_set(x_43, 1, x_42);
|
||||
return x_43;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_44;
|
||||
lean_dec(x_4);
|
||||
x_44 = !lean_is_exclusive(x_6);
|
||||
if (x_44 == 0)
|
||||
{
|
||||
return x_6;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_45; lean_object* x_46; lean_object* x_47;
|
||||
x_45 = lean_ctor_get(x_6, 0);
|
||||
x_46 = lean_ctor_get(x_6, 1);
|
||||
lean_inc(x_46);
|
||||
lean_inc(x_45);
|
||||
lean_dec(x_6);
|
||||
x_47 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_47, 0, x_45);
|
||||
lean_ctor_set(x_47, 1, x_46);
|
||||
return x_47;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_48;
|
||||
x_48 = !lean_is_exclusive(x_3);
|
||||
if (x_48 == 0)
|
||||
{
|
||||
return x_3;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_49; lean_object* x_50; lean_object* x_51;
|
||||
x_49 = lean_ctor_get(x_3, 0);
|
||||
x_50 = lean_ctor_get(x_3, 1);
|
||||
lean_inc(x_50);
|
||||
lean_inc(x_49);
|
||||
lean_dec(x_3);
|
||||
x_51 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_51, 0, x_49);
|
||||
lean_ctor_set(x_51, 1, x_50);
|
||||
return x_51;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
lean_object* initialize_Init(lean_object*);
|
||||
lean_object* initialize_Init_System_IO(lean_object*);
|
||||
lean_object* initialize_Lean_Server(lean_object*);
|
||||
static bool _G_initialized = false;
|
||||
lean_object* initialize_Lean_Server_ServerBin(lean_object* w) {
|
||||
lean_object * res;
|
||||
if (_G_initialized) return lean_io_result_mk_ok(lean_box(0));
|
||||
_G_initialized = true;
|
||||
res = initialize_Init(lean_io_mk_world());
|
||||
if (lean_io_result_is_error(res)) return res;
|
||||
lean_dec_ref(res);
|
||||
res = initialize_Init_System_IO(lean_io_mk_world());
|
||||
if (lean_io_result_is_error(res)) return res;
|
||||
lean_dec_ref(res);
|
||||
res = initialize_Lean_Server(lean_io_mk_world());
|
||||
if (lean_io_result_is_error(res)) return res;
|
||||
lean_dec_ref(res);
|
||||
l_main___boxed__const__1 = _init_l_main___boxed__const__1();
|
||||
lean_mark_persistent(l_main___boxed__const__1);
|
||||
return lean_io_result_mk_ok(lean_box(0));
|
||||
}
|
||||
void lean_initialize();
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
int main(int argc, char ** argv) {
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
SetErrorMode(SEM_FAILCRITICALERRORS);
|
||||
#endif
|
||||
lean_object* in; lean_object* res;
|
||||
lean_initialize();
|
||||
res = initialize_Lean_Server_ServerBin(lean_io_mk_world());
|
||||
lean_io_mark_end_initialization();
|
||||
if (lean_io_result_is_ok(res)) {
|
||||
lean_dec_ref(res);
|
||||
lean_init_task_manager();
|
||||
in = lean_box(0);
|
||||
int i = argc;
|
||||
while (i > 1) {
|
||||
lean_object* n;
|
||||
i--;
|
||||
n = lean_alloc_ctor(1,2,0); lean_ctor_set(n, 0, lean_mk_string(argv[i])); lean_ctor_set(n, 1, in);
|
||||
in = n;
|
||||
}
|
||||
res = _lean_main(in, lean_io_mk_world());
|
||||
}
|
||||
if (lean_io_result_is_ok(res)) {
|
||||
int ret = lean_unbox(lean_io_result_get_value(res));
|
||||
lean_dec_ref(res);
|
||||
return ret;
|
||||
} else {
|
||||
lean_io_result_show_error(res);
|
||||
lean_dec_ref(res);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
Loading…
Add table
Reference in a new issue