chore: update stage0
This commit is contained in:
parent
9270fa5ad8
commit
9ccb511a99
15 changed files with 7294 additions and 1299 deletions
|
|
@ -179,6 +179,12 @@ m.size = 0
|
|||
@[inline] def empty : HashMap α β :=
|
||||
mkHashMap
|
||||
|
||||
def toList (m : HashMap α β) : List (α × β) :=
|
||||
m.fold (fun r k v => (k, v)::r) []
|
||||
|
||||
def toArray (m : HashMap α β) : Array (α × β) :=
|
||||
m.fold (fun r k v => r.push (k, v)) #[]
|
||||
|
||||
def numBuckets (m : HashMap α β) : Nat :=
|
||||
m.val.buckets.val.size
|
||||
|
||||
|
|
|
|||
|
|
@ -154,12 +154,236 @@ else do
|
|||
| Expr.const constName _ _ => pure constName
|
||||
| _ => useSource ()
|
||||
|
||||
/-
|
||||
Recall that `structInstField` elements have the form
|
||||
```
|
||||
def structInstField := parser! structInstLVal >> " := " >> termParser
|
||||
def structInstLVal := (ident <|> numLit <|> structInstArrayRef) >> many (("." >> (ident <|> numLit)) <|> structInstArrayRef)
|
||||
-/
|
||||
|
||||
/- Given a structure instance element `structInstElem`, prepend the new fields. -/
|
||||
private def prependFields (structInstElem : Syntax) (newFields : List Name) : Syntax :=
|
||||
match newFields with
|
||||
| [] => structInstElem
|
||||
| first :: rest =>
|
||||
let currFirst := structInstElem.getArg 0;
|
||||
let currFirst := if currFirst.isIdent then mkNullNode #[mkAtomFrom currFirst ".", currFirst] else currFirst;
|
||||
let restStx := rest.toArray.map $ fun fieldName => mkNullNode #[mkAtomFrom structInstElem ".", mkIdentFrom structInstElem fieldName];
|
||||
let newManyArgs := restStx.push currFirst ++ (structInstElem.getArg 1).getArgs;
|
||||
let structInstElem := structInstElem.setArg 1 (mkNullNode newManyArgs);
|
||||
structInstElem.setArg 0 (mkIdentFrom structInstElem first)
|
||||
|
||||
@[inline] private def modifyStructInstFieldsM {m : Type → Type} [Monad m] (stx : Syntax) (f : Syntax → m Syntax) : m Syntax := do
|
||||
let args := (stx.getArg 2).getArgs;
|
||||
args ← args.mapM $ fun arg =>
|
||||
if arg.getKind == `Lean.Parser.Term.structInstField then
|
||||
f arg
|
||||
else
|
||||
pure arg;
|
||||
pure $ stx.setArg 2 (mkNullNode args)
|
||||
|
||||
@[inline] private def modifyStructInstFields (stx : Syntax) (f : Syntax → Syntax) : Syntax :=
|
||||
Id.run $ modifyStructInstFieldsM stx f
|
||||
|
||||
/- Given a structure instance `stx`, expand the first field of each element if it is a composite name.
|
||||
Example:
|
||||
```
|
||||
(Term.structInstField `x.y (null) ":=" (Term.num (numLit "1")))
|
||||
```
|
||||
is expanded into
|
||||
```
|
||||
(Term.structInstField `x (null (null "." `y)) ":=" (Term.num (numLit "1")))
|
||||
``` -/
|
||||
private def expandCompositeFields (stx : Syntax) : Syntax :=
|
||||
modifyStructInstFields stx $ fun arg =>
|
||||
let field := arg.getArg 0;
|
||||
if field.isIdent then
|
||||
match field.getId with
|
||||
| Name.str Name.anonymous _ _ => arg -- atomic field
|
||||
| Name.str pre s _ =>
|
||||
-- update first with `s`
|
||||
let arg := arg.setArg 0 (mkIdentFrom field (mkNameSimple s));
|
||||
prependFields arg pre.components
|
||||
| _ => unreachable!
|
||||
else
|
||||
arg
|
||||
|
||||
/- Example `{ Prod . 1 := 10, 2 := true }` => `{ Prod . fst := 10, snd := true }` -/
|
||||
private def expandNumLitFields (stx : Syntax) (structName : Name) : TermElabM Syntax := do
|
||||
env ← getEnv;
|
||||
let fieldNames := getStructureFields env structName;
|
||||
modifyStructInstFieldsM stx $ fun arg =>
|
||||
let field := arg.getArg 0;
|
||||
match field.isNatLit? with
|
||||
| none => pure arg
|
||||
| some idx =>
|
||||
if idx == 0 then throwError arg "invalid field index, index must be greater than 0"
|
||||
else if idx > fieldNames.size then throwError arg ("invalid field index, structure has only #" ++ toString fieldNames.size ++ " fields")
|
||||
else
|
||||
let newField := mkIdentFrom field (fieldNames.get! idx);
|
||||
pure $ arg.setArg 0 newField
|
||||
|
||||
/- For example, consider the following structures:
|
||||
```
|
||||
structure A := (x : Nat)
|
||||
structure B extends A := (y : Nat)
|
||||
structure C extends B := (z : Bool)
|
||||
```
|
||||
This method expands parent structure fields using the path to the parent structure.
|
||||
For example,
|
||||
```
|
||||
{ C . x := 0, y := 0, z := true }
|
||||
```
|
||||
is expanded into
|
||||
```
|
||||
{ C . toB.toA.x := 0, toB.y := 0, z := true }
|
||||
``` -/
|
||||
private def expandParentFields (stx : Syntax) (structName : Name) : TermElabM Syntax := do
|
||||
env ← getEnv;
|
||||
modifyStructInstFieldsM stx $ fun arg =>
|
||||
let field := arg.getArg 0;
|
||||
if field.isIdent then
|
||||
let fieldName := field.getId;
|
||||
match findField? env structName fieldName with
|
||||
| none => throwError arg ("'" ++ fieldName ++ "' is not a field of structure '" ++ structName ++ "'")
|
||||
| some baseStructName =>
|
||||
if baseStructName == structName then pure arg
|
||||
else match getPathToBaseStructure? env baseStructName structName with
|
||||
| some path => do
|
||||
let path := path.map $ fun funName => match funName with
|
||||
| Name.str _ s _ => mkNameSimple s
|
||||
| _ => unreachable!;
|
||||
pure $ prependFields arg path
|
||||
| _ => throwError arg ("failed to access field '" ++ fieldName ++ "' in parent structure")
|
||||
else
|
||||
pure arg
|
||||
|
||||
/- We say a `structInstField` is simple if the suffix is empty.
|
||||
That is, the `many` component `many (("." >> (ident <|> numLit)) <|> structInstArrayRef)` is empty. -/
|
||||
private def isSimpleStructInstField (stx : Syntax) : Bool :=
|
||||
(stx.getArg 1).getArgs.isEmpty
|
||||
|
||||
private def getStructInstFields (stx : Syntax) : Array Syntax :=
|
||||
(stx.getArg 2).getArgs.filter $ fun elem => elem.getKind == `Lean.Parser.Term.structInstField
|
||||
|
||||
private def getFieldName (structInstField : Syntax) : Name :=
|
||||
(structInstField.getArg 0).getId
|
||||
|
||||
private abbrev FieldMap := HashMap Name (List Syntax)
|
||||
|
||||
private def groupFields (instFields : Array Syntax) : TermElabM FieldMap :=
|
||||
instFields.foldlM
|
||||
(fun fieldMap instField =>
|
||||
let fieldName := getFieldName instField;
|
||||
match fieldMap.find? fieldName with
|
||||
| some (prevInstField::restInstFields) =>
|
||||
if isSimpleStructInstField prevInstField || isSimpleStructInstField instField then
|
||||
throwError instField ("field '" ++ fieldName ++ "' has already beed specified")
|
||||
else
|
||||
pure $ fieldMap.insert fieldName (instField::prevInstField::restInstFields)
|
||||
| _ => pure $ fieldMap.insert fieldName [instField])
|
||||
{}
|
||||
|
||||
private def isSimpleStructInstFieldSingleton? : List Syntax → Option Syntax
|
||||
| [instField] => if isSimpleStructInstField instField then some instField else none
|
||||
| _ => none
|
||||
|
||||
-- def structInstSource := parser! ".." >> optional termParser
|
||||
private def mkStructInstSource (ref : Syntax) (optTermParser : Syntax) : Syntax :=
|
||||
Syntax.node `Lean.Parser.Term.structInstSource #[mkAtomFrom ref "..", optTermParser]
|
||||
|
||||
private def mkProjStx (s : Syntax) (fieldName : Name) : Syntax :=
|
||||
Syntax.node `Lean.Parser.Term.proj #[s, mkAtomFrom s ".", mkIdentFrom s fieldName]
|
||||
|
||||
structure FieldView :=
|
||||
(ref : Syntax)
|
||||
(fieldName : Name)
|
||||
(val: Syntax)
|
||||
|
||||
private def getFieldViews (stx : Syntax) (sourceView : SourceView) : TermElabM (List FieldView) := do
|
||||
let instFields := getStructInstFields stx;
|
||||
fieldMap ← groupFields instFields;
|
||||
pure $ fieldMap.toList.map $ fun ⟨fieldName, instFields⟩ =>
|
||||
match isSimpleStructInstFieldSingleton? instFields with
|
||||
| some instField => { ref := instField, fieldName := fieldName, val := instField.getArg 3 }
|
||||
| none =>
|
||||
let newArgs := instFields.toArray.map $ fun instField =>
|
||||
let suffixElems := (instField.getArg 1).getArgs;
|
||||
let newField := suffixElems.get! 0;
|
||||
let newField := if newField.getKind == `Lean.Parser.Term.structInstArrayRef then newField else newField.getArg 1;
|
||||
let newSuffixElems := suffixElems.eraseIdx 0;
|
||||
let instField := instField.setArg 0 newField;
|
||||
let instField := instField.setArg 1 (mkNullNode newSuffixElems);
|
||||
instField;
|
||||
let newArgs := match sourceView with
|
||||
| SourceView.none => newArgs
|
||||
| SourceView.implicit => newArgs.push $ mkStructInstSource stx mkNullNode
|
||||
| SourceView.explicit src => newArgs.push $ mkStructInstSource stx (mkNullNode #[mkProjStx src fieldName]);
|
||||
let newStruct := stx.setArg 1 mkNullNode; -- erase explicit struct name
|
||||
let newStruct := stx.setArg 2 (mkSepStx newArgs (mkAtomFrom stx ","));
|
||||
{ ref := instFields.head!, fieldName := fieldName, val := newStruct }
|
||||
|
||||
structure CtorHeaderResult :=
|
||||
(ctorFn : Expr)
|
||||
(ctorFnType : Expr)
|
||||
(instMVars : Array Expr)
|
||||
|
||||
private def mkCtorHeaderAux (ref : Syntax) : Nat → Expr → Expr → Array Expr → TermElabM CtorHeaderResult
|
||||
| 0, type, ctorFn, instMVars => pure { ctorFn := ctorFn, ctorFnType := type, instMVars := instMVars }
|
||||
| n+1, type, ctorFn, instMVars => do
|
||||
type ← whnfForall ref type;
|
||||
match type with
|
||||
| Expr.forallE _ d b c =>
|
||||
match c.binderInfo with
|
||||
| BinderInfo.instImplicit => do
|
||||
a ← mkFreshExprMVar ref d MetavarKind.synthetic;
|
||||
mkCtorHeaderAux n (b.instantiate1 a) (mkApp ctorFn a) (instMVars.push a)
|
||||
| _ => do
|
||||
a ← mkFreshExprMVar ref d;
|
||||
mkCtorHeaderAux n (b.instantiate1 a) (mkApp ctorFn a) instMVars
|
||||
| _ => throwError ref "unexpected constructor type"
|
||||
|
||||
private partial def getForallBody : Nat → Expr → Option Expr
|
||||
| i+1, Expr.forallE _ _ b _ => getForallBody i b
|
||||
| i+1, _ => none
|
||||
| 0, type => type
|
||||
|
||||
private def propagateExpectedType (ref : Syntax) (type : Expr) (numFields : Nat) (expectedType? : Option Expr) : TermElabM Unit :=
|
||||
match expectedType? with
|
||||
| none => pure ()
|
||||
| some expectedType =>
|
||||
match getForallBody numFields type with
|
||||
| none => pure ()
|
||||
| some typeBody =>
|
||||
unless typeBody.hasLooseBVars $ do
|
||||
isDefEq ref expectedType typeBody;
|
||||
pure ()
|
||||
|
||||
/-
|
||||
Create structure ctor, with fresh metavariable for universe levels and parameters, and then propagate expected (if available).
|
||||
Note that the expected type propagate is slightly different from the one in regular applications. -/
|
||||
private def mkCtorHeader (ref : Syntax) (ctorVal : ConstructorVal) (expectedType? : Option Expr) : TermElabM CtorHeaderResult := do
|
||||
lvls ← ctorVal.lparams.mapM $ fun _ => mkFreshLevelMVar ref;
|
||||
let val := Lean.mkConst ctorVal.name lvls;
|
||||
let type := (ConstantInfo.ctorInfo ctorVal).instantiateTypeLevelParams lvls;
|
||||
r ← mkCtorHeaderAux ref ctorVal.nparams type val #[];
|
||||
propagateExpectedType ref r.ctorFnType ctorVal.nfields expectedType?;
|
||||
pure r
|
||||
|
||||
private def elabStructInstAux (stx : Syntax) (expectedType? : Option Expr) (sourceView : SourceView) : TermElabM Expr := do
|
||||
structName ← getStructName stx expectedType? sourceView;
|
||||
env ← getEnv;
|
||||
unless (isStructureLike env structName) $
|
||||
throwError stx ("invalid {...} notation, '" ++ structName ++ "' is not a structure");
|
||||
throwError stx ("WIP " ++ toString structName ++ toString stx)
|
||||
let stx := expandCompositeFields stx;
|
||||
stx ← expandNumLitFields stx structName;
|
||||
stx ← expandParentFields stx structName;
|
||||
fieldViews ← getFieldViews stx sourceView;
|
||||
let ctorVal := getStructureCtor env structName;
|
||||
ctorHeader ← mkCtorHeader stx ctorVal expectedType?;
|
||||
-- fieldViews.forM $ fun v => dbgTrace (toString v.fieldName ++ " := " ++ toString v.val);
|
||||
-- dbgTrace (">> " ++ toString ctorHeader.ctorFn);
|
||||
throwError stx ("WIP")
|
||||
|
||||
@[builtinTermElab structInst] def elabStructInst : TermElab :=
|
||||
fun stx expectedType? => do
|
||||
|
|
|
|||
|
|
@ -1442,31 +1442,44 @@ let nameP := if anonymous then nameP <|> noImmediateColon >> pushNone >> pushNon
|
|||
-- antiquotations are not part of the "standard" syntax, so hide "expected '$'" on error
|
||||
node kind $ try $ setExpected [] dollarSymbol >> checkNoWsBefore "no space before" >> antiquotExpr >> nameP >> optional (checkNoWsBefore "" >> "*")
|
||||
|
||||
@[inline] def withAntiquotFn (antiquotP p : ParserFn) : ParserFn :=
|
||||
fun c s =>
|
||||
let (s, stx?) := peekToken c s;
|
||||
let tryAnti := match stx? with
|
||||
| some stx@(Syntax.atom _ sym) => sym == "$"
|
||||
| _ => false;
|
||||
(if tryAnti then orelseFn antiquotP p else p) c s
|
||||
|
||||
/-- Optimized version of `mkAntiquot ... <|> p`. -/
|
||||
@[inline] def withAntiquot (antiquotP p : Parser) : Parser :=
|
||||
{ fn := withAntiquotFn antiquotP.fn p.fn,
|
||||
info := orelseInfo antiquotP.info p.info }
|
||||
|
||||
/- ===================== -/
|
||||
/- End of Antiquotations -/
|
||||
/- ===================== -/
|
||||
|
||||
def nodeWithAntiquot (name : String) (kind : SyntaxNodeKind) (p : Parser) : Parser :=
|
||||
mkAntiquot name kind false <|> node kind p
|
||||
withAntiquot (mkAntiquot name kind false) $ node kind p
|
||||
|
||||
def ident : Parser :=
|
||||
mkAntiquot "ident" identKind <|> identNoAntiquot
|
||||
withAntiquot (mkAntiquot "ident" identKind) identNoAntiquot
|
||||
|
||||
-- `ident` and `rawIdent` produce the same syntax tree, so we reuse the antiquotation kind name
|
||||
def rawIdent : Parser :=
|
||||
mkAntiquot "ident" identKind <|> rawIdentNoAntiquot
|
||||
withAntiquot (mkAntiquot "ident" identKind) rawIdentNoAntiquot
|
||||
|
||||
def numLit : Parser :=
|
||||
mkAntiquot "numLit" numLitKind <|> numLitNoAntiquot
|
||||
withAntiquot (mkAntiquot "numLit" numLitKind) numLitNoAntiquot
|
||||
|
||||
def strLit : Parser :=
|
||||
mkAntiquot "strLit" strLitKind <|> strLitNoAntiquot
|
||||
withAntiquot (mkAntiquot "strLit" strLitKind) strLitNoAntiquot
|
||||
|
||||
def charLit : Parser :=
|
||||
mkAntiquot "charLit" charLitKind <|> charLitNoAntiquot
|
||||
withAntiquot (mkAntiquot "charLit" charLitKind) charLitNoAntiquot
|
||||
|
||||
def nameLit : Parser :=
|
||||
mkAntiquot "nameLit" nameLitKind <|> nameLitNoAntiquot
|
||||
withAntiquot (mkAntiquot "nameLit" nameLitKind) nameLitNoAntiquot
|
||||
|
||||
def categoryParserOfStackFn (offset : Nat) : ParserFn :=
|
||||
fun ctx s =>
|
||||
|
|
@ -1496,29 +1509,8 @@ fun c s =>
|
|||
let s := longestMatchFn ps c s;
|
||||
mkResult s iniSz
|
||||
|
||||
private def catNameToString : Name → String
|
||||
| Name.str Name.anonymous s _ => s
|
||||
| n => n.toString
|
||||
|
||||
@[inline] def leadingParserAntiquot (kind : Name) : ParserFn :=
|
||||
-- allow "anonymous" antiquotations `$x` for the `term` category only
|
||||
-- TODO: make customizable
|
||||
-- one good example for a category that should not be anonymous is
|
||||
-- `index` in `tests/lean/run/bigop.lean`.
|
||||
let anonAntiquot := kind == `term;
|
||||
(mkAntiquot (catNameToString kind) none anonAntiquot).fn
|
||||
|
||||
private def isDollar (c : ParserContext) (s : ParserState) : Bool :=
|
||||
match peekToken c s with
|
||||
| (_, some (Syntax.atom _ val)) => val == "$"
|
||||
| _ => false
|
||||
|
||||
def leadingParser (kind : Name) (tables : PrattParsingTables) (leadingIdentAsSymbol : Bool) (antiquotParser : Bool) : ParserFn :=
|
||||
fun c s =>
|
||||
if antiquotParser && isDollar c s then
|
||||
orelseFn (leadingParserAntiquot kind) (leadingParserAux kind tables leadingIdentAsSymbol) c s
|
||||
else
|
||||
leadingParserAux kind tables leadingIdentAsSymbol c s
|
||||
@[inline] def leadingParser (kind : Name) (tables : PrattParsingTables) (leadingIdentAsSymbol : Bool) (antiquotParser : ParserFn) : ParserFn :=
|
||||
withAntiquotFn antiquotParser (leadingParserAux kind tables leadingIdentAsSymbol)
|
||||
|
||||
def trailingLoopStep (tables : PrattParsingTables) (ps : List Parser) : ParserFn :=
|
||||
fun c s =>
|
||||
|
|
@ -1553,10 +1545,10 @@ partial def trailingLoop (tables : PrattParsingTables) (c : ParserContext) : Par
|
|||
/--
|
||||
Implements a recursive precedence parser according to Pratt's algorithm.
|
||||
|
||||
If `antiquotParser == true`, we inject the antiquotation parser into syntax categories.
|
||||
`antiquotParser` should be a `mkAntiquot` parser (or always fail) and is tried before all other parsers.
|
||||
It should not be added to the regular leading parsers because it would heavily
|
||||
overlap with antiquotation parsers nested inside them. -/
|
||||
def prattParser (kind : Name) (tables : PrattParsingTables) (leadingIdentAsSymbol : Bool) (antiquotParser : Bool) : ParserFn :=
|
||||
@[inline] def prattParser (kind : Name) (tables : PrattParsingTables) (leadingIdentAsSymbol : Bool) (antiquotParser : ParserFn) : ParserFn :=
|
||||
fun c s =>
|
||||
let left := s.stxStack.back;
|
||||
let (s, lbp) := currLbp left c s;
|
||||
|
|
@ -1819,12 +1811,24 @@ match (parserExtension.getState env).categories.find? catName with
|
|||
| none => false
|
||||
| some cat => cat.leadingIdentAsSymbol
|
||||
|
||||
private def catNameToString : Name → String
|
||||
| Name.str Name.anonymous s _ => s
|
||||
| n => n.toString
|
||||
|
||||
@[inline] def mkCategoryAntiquotParser (kind : Name) : ParserFn :=
|
||||
-- allow "anonymous" antiquotations `$x` for the `term` category only
|
||||
-- TODO: make customizable
|
||||
-- one good example for a category that should not be anonymous is
|
||||
-- `index` in `tests/lean/run/bigop.lean`.
|
||||
let anonAntiquot := kind == `term;
|
||||
(mkAntiquot (catNameToString kind) none anonAntiquot).fn
|
||||
|
||||
def categoryParserFnImpl (catName : Name) : ParserFn :=
|
||||
fun ctx s =>
|
||||
let categories := (parserExtension.getState ctx.env).categories;
|
||||
match categories.find? catName with
|
||||
| some cat =>
|
||||
prattParser catName cat.tables cat.leadingIdentAsSymbol true ctx s
|
||||
prattParser catName cat.tables cat.leadingIdentAsSymbol (mkCategoryAntiquotParser catName) ctx s
|
||||
| none => s.mkUnexpectedError ("unknown parser category '" ++ toString catName ++ "'")
|
||||
|
||||
@[init] def setCategoryParserFnRef : IO Unit :=
|
||||
|
|
@ -1978,9 +1982,9 @@ fun c s =>
|
|||
s.mkErrorAt "field index" iniPos
|
||||
|
||||
@[inline] def fieldIdx : Parser :=
|
||||
mkAntiquot "fieldIdx" `fieldIdx <|>
|
||||
{ fn := fieldIdxFn,
|
||||
info := mkAtomicInfo "fieldIdx" }
|
||||
withAntiquot (mkAntiquot "fieldIdx" `fieldIdx)
|
||||
{ fn := fieldIdxFn,
|
||||
info := mkAtomicInfo "fieldIdx" }
|
||||
|
||||
end Parser
|
||||
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ def haveAssign := parser! " := " >> termParser
|
|||
@[builtinTermParser] def «show» := parser! symbol "show " leadPrec >> termParser >> fromTerm
|
||||
@[builtinTermParser] def «fun» := parser! unicodeSymbol "λ" "fun" leadPrec >> many1 (termParser appPrec) >> darrow >> termParser
|
||||
def structInstArrayRef := parser! "[" >> termParser >>"]"
|
||||
def structInstLVal := (ident <|> structInstArrayRef) >> many (("." >> (ident <|> numLit)) <|> structInstArrayRef)
|
||||
def structInstLVal := (ident <|> numLit <|> structInstArrayRef) >> many (group ("." >> (ident <|> numLit)) <|> structInstArrayRef)
|
||||
def structInstField := parser! structInstLVal >> " := " >> termParser
|
||||
def structInstSource := parser! ".." >> optional termParser
|
||||
@[builtinTermParser] def structInst := parser! symbol "{" appPrec >> optional (try (ident >> " . ")) >> sepBy (structInstField <|> structInstSource) ", " true >> "}"
|
||||
|
|
|
|||
|
|
@ -434,6 +434,13 @@ Syntax.ident none (toString val).toSubstring val []
|
|||
@[inline] def mkNullNode (args : Array Syntax := #[]) : Syntax :=
|
||||
Syntax.node nullKind args
|
||||
|
||||
def mkSepStx (a : Array Syntax) (sep : Syntax) : Syntax :=
|
||||
mkNullNode $ a.iterate #[] $ fun i a r =>
|
||||
if i.val > 0 then
|
||||
(r.push sep).push a
|
||||
else
|
||||
r.push a
|
||||
|
||||
def mkOptionalNode (arg : Option Syntax) : Syntax :=
|
||||
match arg with
|
||||
| some arg => Syntax.node nullKind #[arg]
|
||||
|
|
|
|||
|
|
@ -797,7 +797,7 @@ static expr parse_parser(parser & p, bool leading, pos_info const & pos) {
|
|||
name n = leading ? get_lean_parser_leading_node_name() : get_lean_parser_trailing_node_name();
|
||||
expr r = mk_app(mk_constant(n), quote(kind), e);
|
||||
if (leading && kind.is_string()) {
|
||||
r = mk_app(mk_constant({"HasOrelse", "orelse"}),
|
||||
r = mk_app(mk_constant({"Lean", "Parser", "withAntiquot"}),
|
||||
mk_app(mk_constant({"Lean", "Parser", "mkAntiquot"}),
|
||||
quote(kind.get_string().data()),
|
||||
quote(kind)),
|
||||
|
|
|
|||
|
|
@ -13,13 +13,16 @@
|
|||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
lean_object* l_AssocList_foldlM___main___at_HashMap_toArray___spec__1(lean_object*, lean_object*);
|
||||
lean_object* l_HashMap_foldM___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_HashMap_size___rarg___boxed(lean_object*);
|
||||
lean_object* l_mkHashMap(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_HashMap_erase___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_HashMap_toList___rarg(lean_object*);
|
||||
lean_object* l_HashMap_find_x21___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_mkHashMapImp___rarg___closed__2;
|
||||
lean_object* lean_array_uget(lean_object*, size_t);
|
||||
lean_object* l_HashMap_toArray___rarg___boxed(lean_object*);
|
||||
lean_object* l_mkHashMapImp___rarg___closed__1;
|
||||
lean_object* l_HashMap_size(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_HashMap_HasEmptyc(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -27,6 +30,7 @@ lean_object* l_HashMap_fold___rarg___boxed(lean_object*, lean_object*, lean_obje
|
|||
lean_object* l_Array_iterateMAux___main___at_HashMapImp_foldM___spec__1___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_HashMapImp_foldBuckets(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* lean_array_uset(lean_object*, size_t, lean_object*);
|
||||
extern lean_object* l_Array_empty___closed__1;
|
||||
lean_object* l_HashMapImp_moveEntries(lean_object*, lean_object*);
|
||||
lean_object* l___private_Init_Util_1__mkPanicMessage(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_HashMap_numBuckets(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -34,14 +38,18 @@ lean_object* l_HashMap_getOp(lean_object*, lean_object*);
|
|||
lean_object* l_HashMap_HasEmptyc___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Array_iterateMAux___main___at_HashMapImp_foldM___spec__1(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_HashMapImp_fold(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_HashMap_toArray___rarg(lean_object*);
|
||||
lean_object* l_HashMapImp_find_x3f___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_HashMapImp_erase(lean_object*, lean_object*);
|
||||
lean_object* l_AssocList_foldlM___main___at_HashMapImp_fold___spec__1___rarg(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* lean_array_push(lean_object*, lean_object*);
|
||||
lean_object* lean_array_get_size(lean_object*);
|
||||
lean_object* l_HashMap_find_x3f___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_HashMapImp_foldM(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_HashMapImp_insert___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Array_iterateMAux___main___at_HashMap_toArray___spec__2___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_HashMapImp_expand(lean_object*, lean_object*);
|
||||
lean_object* l_HashMap_toList(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* lean_nat_add(lean_object*, lean_object*);
|
||||
lean_object* l_HashMap_fold(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_HashMap_fold___rarg(lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -49,13 +57,16 @@ lean_object* l_Array_iterateMAux___main___at_HashMap_fold___spec__2___rarg___box
|
|||
lean_object* l_HashMapImp_moveEntries___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_AssocList_find___main___rarg(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Array_iterateMAux___main___at_HashMapImp_foldBucketsM___spec__1(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_AssocList_foldlM___main___at_HashMap_toArray___spec__1___rarg(lean_object*, lean_object*);
|
||||
lean_object* l_HashMap_find_x21(lean_object*, lean_object*);
|
||||
lean_object* l_HashMap_findD___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Array_iterateMAux___main___at_HashMap_toList___spec__2___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* lean_array_fget(lean_object*, lean_object*);
|
||||
lean_object* l_HashMapImp_insert(lean_object*, lean_object*);
|
||||
uint8_t lean_nat_dec_eq(lean_object*, lean_object*);
|
||||
lean_object* l_Array_iterateMAux___main___at_HashMapImp_foldBuckets___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_AssocList_foldlM___main___at_HashMapImp_fold___spec__1(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_HashMap_toList___rarg___boxed(lean_object*);
|
||||
lean_object* lean_nat_sub(lean_object*, lean_object*);
|
||||
lean_object* l_HashMapImp_reinsertAux___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Array_iterateMAux___main___at_HashMap_foldM___spec__1(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -63,21 +74,27 @@ lean_object* l_HashMapImp_expand___rarg(lean_object*, lean_object*, lean_object*
|
|||
lean_object* l_HashMapImp_contains(lean_object*, lean_object*);
|
||||
lean_object* lean_array_fset(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_AssocList_foldlM___main___at_HashMapImp_moveEntries___main___spec__1___rarg(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_AssocList_foldlM___main___at_HashMap_toList___spec__1___rarg___boxed(lean_object*, lean_object*);
|
||||
lean_object* l_HashMap_erase(lean_object*, lean_object*);
|
||||
lean_object* l_HashMapImp_erase___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_HashMapImp_find_x3f___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_HashMap_toArray___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_AssocList_foldlM___main___at_HashMap_fold___spec__1(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_AssocList_foldlM___main___at_HashMapImp_foldBuckets___spec__1(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_HashMap_Inhabited(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_HashMap_toArray(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Array_iterateMAux___main___at_HashMapImp_foldBuckets___spec__2(lean_object*, lean_object*, lean_object*);
|
||||
uint8_t l_AssocList_contains___main___rarg(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_HashMap_isEmpty(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_AssocList_foldlM___main___at_HashMapImp_foldBuckets___spec__1___rarg(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_HashMap_getOp___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Array_iterateMAux___main___at_HashMap_toList___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
size_t lean_usize_modn(size_t, lean_object*);
|
||||
lean_object* l_HashMap_toList___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_HashMapBucket_update(lean_object*, lean_object*);
|
||||
lean_object* l_HashMap_find_x3f___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_mkHashMapImp___rarg(lean_object*);
|
||||
lean_object* l_Array_iterateMAux___main___at_HashMap_toArray___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_HashMap_numBuckets___rarg___boxed(lean_object*);
|
||||
lean_object* l_HashMap_numBuckets___rarg(lean_object*);
|
||||
lean_object* l_mkHashMapImp(lean_object*, lean_object*);
|
||||
|
|
@ -98,14 +115,18 @@ lean_object* l_HashMap_contains(lean_object*, lean_object*);
|
|||
lean_object* l_mkHashMap___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_HashMap_size___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* lean_panic_fn(lean_object*, lean_object*);
|
||||
lean_object* l_Array_iterateMAux___main___at_HashMap_toArray___spec__2(lean_object*, lean_object*);
|
||||
lean_object* l_HashMapImp_reinsertAux(lean_object*, lean_object*);
|
||||
lean_object* l_HashMapImp_find_x3f(lean_object*, lean_object*);
|
||||
lean_object* l_HashMap_size___rarg(lean_object*);
|
||||
lean_object* l_HashMap_findD___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_AssocList_foldlM___main___at_HashMap_toList___spec__1(lean_object*, lean_object*);
|
||||
lean_object* l_AssocList_foldlM___main___at_HashMap_toList___spec__1___rarg(lean_object*, lean_object*);
|
||||
lean_object* l_Array_iterateMAux___main___at_HashMapImp_foldM___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_HashMapBucket_update___rarg(lean_object*, size_t, lean_object*, lean_object*);
|
||||
lean_object* l_Array_iterateMAux___main___at_HashMap_fold___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* lean_nat_mul(lean_object*, lean_object*);
|
||||
lean_object* l_Array_iterateMAux___main___at_HashMap_toList___spec__2(lean_object*, lean_object*);
|
||||
lean_object* l_HashMapBucket_update___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
uint8_t l_HashMapImp_contains___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_HashMap_getOp___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -113,6 +134,7 @@ lean_object* l_Array_iterateMAux___main___at_HashMapImp_foldBuckets___spec__2___
|
|||
lean_object* l_Array_iterateMAux___main___at_HashMap_foldM___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Array_iterateMAux___main___at_HashMapImp_fold___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_HashMap_find_x3f(lean_object*, lean_object*);
|
||||
lean_object* l_AssocList_foldlM___main___at_HashMap_toArray___spec__1___rarg___boxed(lean_object*, lean_object*);
|
||||
lean_object* lean_mk_array(lean_object*, lean_object*);
|
||||
uint8_t l_HashMap_contains___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_HashMapImp_foldBucketsM(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -1663,6 +1685,258 @@ lean_dec(x_3);
|
|||
return x_5;
|
||||
}
|
||||
}
|
||||
lean_object* l_AssocList_foldlM___main___at_HashMap_toList___spec__1___rarg(lean_object* x_1, lean_object* x_2) {
|
||||
_start:
|
||||
{
|
||||
if (lean_obj_tag(x_2) == 0)
|
||||
{
|
||||
return x_1;
|
||||
}
|
||||
else
|
||||
{
|
||||
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_2, 0);
|
||||
x_4 = lean_ctor_get(x_2, 1);
|
||||
x_5 = lean_ctor_get(x_2, 2);
|
||||
lean_inc(x_4);
|
||||
lean_inc(x_3);
|
||||
x_6 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_6, 0, x_3);
|
||||
lean_ctor_set(x_6, 1, x_4);
|
||||
x_7 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_7, 0, x_6);
|
||||
lean_ctor_set(x_7, 1, x_1);
|
||||
x_1 = x_7;
|
||||
x_2 = x_5;
|
||||
goto _start;
|
||||
}
|
||||
}
|
||||
}
|
||||
lean_object* l_AssocList_foldlM___main___at_HashMap_toList___spec__1(lean_object* x_1, lean_object* x_2) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_3;
|
||||
x_3 = lean_alloc_closure((void*)(l_AssocList_foldlM___main___at_HashMap_toList___spec__1___rarg___boxed), 2, 0);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
lean_object* l_Array_iterateMAux___main___at_HashMap_toList___spec__2___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_5; uint8_t x_6;
|
||||
x_5 = lean_array_get_size(x_2);
|
||||
x_6 = lean_nat_dec_lt(x_3, x_5);
|
||||
lean_dec(x_5);
|
||||
if (x_6 == 0)
|
||||
{
|
||||
lean_dec(x_3);
|
||||
return x_4;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10;
|
||||
x_7 = lean_array_fget(x_2, x_3);
|
||||
x_8 = l_AssocList_foldlM___main___at_HashMap_toList___spec__1___rarg(x_4, x_7);
|
||||
lean_dec(x_7);
|
||||
x_9 = lean_unsigned_to_nat(1u);
|
||||
x_10 = lean_nat_add(x_3, x_9);
|
||||
lean_dec(x_3);
|
||||
x_3 = x_10;
|
||||
x_4 = x_8;
|
||||
goto _start;
|
||||
}
|
||||
}
|
||||
}
|
||||
lean_object* l_Array_iterateMAux___main___at_HashMap_toList___spec__2(lean_object* x_1, lean_object* x_2) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_3;
|
||||
x_3 = lean_alloc_closure((void*)(l_Array_iterateMAux___main___at_HashMap_toList___spec__2___rarg___boxed), 4, 0);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
lean_object* l_HashMap_toList___rarg(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5;
|
||||
x_2 = lean_box(0);
|
||||
x_3 = lean_ctor_get(x_1, 1);
|
||||
x_4 = lean_unsigned_to_nat(0u);
|
||||
x_5 = l_Array_iterateMAux___main___at_HashMap_toList___spec__2___rarg(x_1, x_3, x_4, x_2);
|
||||
return x_5;
|
||||
}
|
||||
}
|
||||
lean_object* l_HashMap_toList(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_5;
|
||||
x_5 = lean_alloc_closure((void*)(l_HashMap_toList___rarg___boxed), 1, 0);
|
||||
return x_5;
|
||||
}
|
||||
}
|
||||
lean_object* l_AssocList_foldlM___main___at_HashMap_toList___spec__1___rarg___boxed(lean_object* x_1, lean_object* x_2) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_3;
|
||||
x_3 = l_AssocList_foldlM___main___at_HashMap_toList___spec__1___rarg(x_1, x_2);
|
||||
lean_dec(x_2);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
lean_object* l_Array_iterateMAux___main___at_HashMap_toList___spec__2___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_5;
|
||||
x_5 = l_Array_iterateMAux___main___at_HashMap_toList___spec__2___rarg(x_1, x_2, x_3, x_4);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
return x_5;
|
||||
}
|
||||
}
|
||||
lean_object* l_HashMap_toList___rarg___boxed(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_2;
|
||||
x_2 = l_HashMap_toList___rarg(x_1);
|
||||
lean_dec(x_1);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
lean_object* l_HashMap_toList___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_5;
|
||||
x_5 = l_HashMap_toList(x_1, x_2, x_3, x_4);
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_3);
|
||||
return x_5;
|
||||
}
|
||||
}
|
||||
lean_object* l_AssocList_foldlM___main___at_HashMap_toArray___spec__1___rarg(lean_object* x_1, lean_object* x_2) {
|
||||
_start:
|
||||
{
|
||||
if (lean_obj_tag(x_2) == 0)
|
||||
{
|
||||
return x_1;
|
||||
}
|
||||
else
|
||||
{
|
||||
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_2, 0);
|
||||
x_4 = lean_ctor_get(x_2, 1);
|
||||
x_5 = lean_ctor_get(x_2, 2);
|
||||
lean_inc(x_4);
|
||||
lean_inc(x_3);
|
||||
x_6 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_6, 0, x_3);
|
||||
lean_ctor_set(x_6, 1, x_4);
|
||||
x_7 = lean_array_push(x_1, x_6);
|
||||
x_1 = x_7;
|
||||
x_2 = x_5;
|
||||
goto _start;
|
||||
}
|
||||
}
|
||||
}
|
||||
lean_object* l_AssocList_foldlM___main___at_HashMap_toArray___spec__1(lean_object* x_1, lean_object* x_2) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_3;
|
||||
x_3 = lean_alloc_closure((void*)(l_AssocList_foldlM___main___at_HashMap_toArray___spec__1___rarg___boxed), 2, 0);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
lean_object* l_Array_iterateMAux___main___at_HashMap_toArray___spec__2___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_5; uint8_t x_6;
|
||||
x_5 = lean_array_get_size(x_2);
|
||||
x_6 = lean_nat_dec_lt(x_3, x_5);
|
||||
lean_dec(x_5);
|
||||
if (x_6 == 0)
|
||||
{
|
||||
lean_dec(x_3);
|
||||
return x_4;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10;
|
||||
x_7 = lean_array_fget(x_2, x_3);
|
||||
x_8 = l_AssocList_foldlM___main___at_HashMap_toArray___spec__1___rarg(x_4, x_7);
|
||||
lean_dec(x_7);
|
||||
x_9 = lean_unsigned_to_nat(1u);
|
||||
x_10 = lean_nat_add(x_3, x_9);
|
||||
lean_dec(x_3);
|
||||
x_3 = x_10;
|
||||
x_4 = x_8;
|
||||
goto _start;
|
||||
}
|
||||
}
|
||||
}
|
||||
lean_object* l_Array_iterateMAux___main___at_HashMap_toArray___spec__2(lean_object* x_1, lean_object* x_2) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_3;
|
||||
x_3 = lean_alloc_closure((void*)(l_Array_iterateMAux___main___at_HashMap_toArray___spec__2___rarg___boxed), 4, 0);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
lean_object* l_HashMap_toArray___rarg(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5;
|
||||
x_2 = lean_ctor_get(x_1, 1);
|
||||
x_3 = lean_unsigned_to_nat(0u);
|
||||
x_4 = l_Array_empty___closed__1;
|
||||
x_5 = l_Array_iterateMAux___main___at_HashMap_toArray___spec__2___rarg(x_1, x_2, x_3, x_4);
|
||||
return x_5;
|
||||
}
|
||||
}
|
||||
lean_object* l_HashMap_toArray(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_5;
|
||||
x_5 = lean_alloc_closure((void*)(l_HashMap_toArray___rarg___boxed), 1, 0);
|
||||
return x_5;
|
||||
}
|
||||
}
|
||||
lean_object* l_AssocList_foldlM___main___at_HashMap_toArray___spec__1___rarg___boxed(lean_object* x_1, lean_object* x_2) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_3;
|
||||
x_3 = l_AssocList_foldlM___main___at_HashMap_toArray___spec__1___rarg(x_1, x_2);
|
||||
lean_dec(x_2);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
lean_object* l_Array_iterateMAux___main___at_HashMap_toArray___spec__2___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_5;
|
||||
x_5 = l_Array_iterateMAux___main___at_HashMap_toArray___spec__2___rarg(x_1, x_2, x_3, x_4);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
return x_5;
|
||||
}
|
||||
}
|
||||
lean_object* l_HashMap_toArray___rarg___boxed(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_2;
|
||||
x_2 = l_HashMap_toArray___rarg(x_1);
|
||||
lean_dec(x_1);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
lean_object* l_HashMap_toArray___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_5;
|
||||
x_5 = l_HashMap_toArray(x_1, x_2, x_3, x_4);
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_3);
|
||||
return x_5;
|
||||
}
|
||||
}
|
||||
lean_object* l_HashMap_numBuckets___rarg(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ lean_object* l_PersistentHashMap_findAux___main___at_Lean_Elab_Command_elabComma
|
|||
extern lean_object* l_Lean_Meta_check___closed__1;
|
||||
lean_object* l_Lean_Syntax_isNatLitAux(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Command_getOptions(lean_object*, lean_object*);
|
||||
extern lean_object* l___private_Init_Lean_Parser_Parser_27__BuiltinParserAttribute_add___closed__2;
|
||||
extern lean_object* l_Lean_Elab_Tactic_evalTactic___main___closed__3;
|
||||
extern lean_object* l_Lean_Parser_declareBuiltinParser___closed__8;
|
||||
lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabNamespace___closed__3;
|
||||
|
|
@ -329,6 +330,7 @@ extern lean_object* l_Lean_Parser_Command_open___elambda__1___closed__2;
|
|||
uint8_t l_Array_contains___at_Lean_findField_x3f___main___spec__1(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Command_CommandElabM_MonadQuotation___closed__1;
|
||||
lean_object* l_Lean_Elab_mkElabAttribute___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
extern lean_object* l___private_Init_Lean_Parser_Parser_16__throwParserCategoryAlreadyDefined___rarg___closed__2;
|
||||
lean_object* l_Lean_Elab_Command_elabEnd___closed__2;
|
||||
lean_object* l_Lean_Elab_Command_elabCommand(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Command_liftIO___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -487,7 +489,6 @@ lean_object* l___private_Init_Lean_Elab_Command_4__modifyGetState___rarg(lean_ob
|
|||
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_Command_declareBuiltinCommandElab___closed__7;
|
||||
extern lean_object* l___private_Init_Lean_Parser_Parser_18__throwParserCategoryAlreadyDefined___rarg___closed__2;
|
||||
lean_object* l_Lean_Elab_Command_elabVariable___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Init_Lean_Elab_Command_12__addScopes(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Command_Lean_Elab_MonadMacroAdapter___closed__7;
|
||||
|
|
@ -543,7 +544,6 @@ lean_object* l_Lean_Elab_mkMessageAt___at_Lean_Elab_Command_throwError___spec__3
|
|||
lean_object* lean_usize_to_nat(size_t);
|
||||
lean_object* l___private_Init_Lean_Elab_Command_12__addScopes___main___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Init_Lean_Elab_Command_12__addScopes___main___closed__1;
|
||||
extern lean_object* l___private_Init_Lean_Parser_Parser_28__BuiltinParserAttribute_add___closed__2;
|
||||
extern lean_object* l_Lean_addClass___closed__1;
|
||||
lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabVariable___closed__1;
|
||||
lean_object* l_Lean_Elab_Command_commandElabAttribute___closed__1;
|
||||
|
|
@ -3408,7 +3408,7 @@ x_27 = l_Lean_Name_toStringWithSep___main(x_26, x_1);
|
|||
x_28 = l_Lean_Elab_Command_addBuiltinCommandElab___closed__1;
|
||||
x_29 = lean_string_append(x_28, x_27);
|
||||
lean_dec(x_27);
|
||||
x_30 = l___private_Init_Lean_Parser_Parser_18__throwParserCategoryAlreadyDefined___rarg___closed__2;
|
||||
x_30 = l___private_Init_Lean_Parser_Parser_16__throwParserCategoryAlreadyDefined___rarg___closed__2;
|
||||
x_31 = lean_string_append(x_29, x_30);
|
||||
x_32 = lean_alloc_ctor(18, 1, 0);
|
||||
lean_ctor_set(x_32, 0, x_31);
|
||||
|
|
@ -3513,7 +3513,7 @@ x_52 = l_Lean_Name_toStringWithSep___main(x_51, x_1);
|
|||
x_53 = l_Lean_Elab_Command_addBuiltinCommandElab___closed__1;
|
||||
x_54 = lean_string_append(x_53, x_52);
|
||||
lean_dec(x_52);
|
||||
x_55 = l___private_Init_Lean_Parser_Parser_18__throwParserCategoryAlreadyDefined___rarg___closed__2;
|
||||
x_55 = l___private_Init_Lean_Parser_Parser_16__throwParserCategoryAlreadyDefined___rarg___closed__2;
|
||||
x_56 = lean_string_append(x_54, x_55);
|
||||
x_57 = lean_alloc_ctor(18, 1, 0);
|
||||
lean_ctor_set(x_57, 0, x_56);
|
||||
|
|
@ -3840,7 +3840,7 @@ lean_dec(x_13);
|
|||
lean_dec(x_11);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
x_25 = l___private_Init_Lean_Parser_Parser_28__BuiltinParserAttribute_add___closed__2;
|
||||
x_25 = l___private_Init_Lean_Parser_Parser_27__BuiltinParserAttribute_add___closed__2;
|
||||
x_26 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_26, 0, x_25);
|
||||
lean_ctor_set(x_26, 1, x_12);
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -25,6 +25,7 @@ lean_object* l_Lean_registerTraceClass(lean_object*, lean_object*);
|
|||
lean_object* l_Lean_Elab_Tactic_withMVarContext___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
uint8_t l_PersistentHashMap_contains___at_Lean_Elab_Tactic_addBuiltinTactic___spec__4(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Tactic_Lean_Elab_MonadMacroAdapter___closed__7;
|
||||
extern lean_object* l___private_Init_Lean_Parser_Parser_27__BuiltinParserAttribute_add___closed__2;
|
||||
lean_object* l_Lean_Elab_Tactic_evalTactic___main___closed__3;
|
||||
extern lean_object* l_Lean_Parser_declareBuiltinParser___closed__8;
|
||||
lean_object* l_PersistentHashMap_find_x3f___at_Lean_Elab_Tactic_evalTactic___main___spec__2(lean_object*, lean_object*);
|
||||
|
|
@ -243,6 +244,7 @@ lean_object* l___regBuiltinTactic_Lean_Elab_Tactic_evalSkip___closed__1;
|
|||
extern lean_object* l_Lean_Parser_Tactic_paren___elambda__1___closed__1;
|
||||
lean_object* l_Lean_Elab_Tactic_monadLog___closed__1;
|
||||
lean_object* l_Lean_Elab_mkElabAttribute___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
extern lean_object* l___private_Init_Lean_Parser_Parser_16__throwParserCategoryAlreadyDefined___rarg___closed__2;
|
||||
lean_object* l_Lean_Elab_Tactic_save___boxed(lean_object*);
|
||||
lean_object* l_Lean_Elab_Tactic_registerBuiltinTacticAttr___closed__5;
|
||||
lean_object* l_mkHashMapImp___rarg(lean_object*);
|
||||
|
|
@ -382,7 +384,6 @@ 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_Tactic_evalTraceState___boxed(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Tactic_tacticElabAttribute___closed__3;
|
||||
extern lean_object* l___private_Init_Lean_Parser_Parser_18__throwParserCategoryAlreadyDefined___rarg___closed__2;
|
||||
lean_object* l_Lean_Elab_Tactic_evalIntro___lambda__2(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___regBuiltinTactic_Lean_Elab_Tactic_evalNestedTacticBlock(lean_object*);
|
||||
lean_object* l_HashMapImp_contains___at_Lean_Elab_Tactic_addBuiltinTactic___spec__2___boxed(lean_object*, lean_object*);
|
||||
|
|
@ -429,7 +430,6 @@ lean_object* l_Lean_Elab_Tactic_monadLog___lambda__3___boxed(lean_object*, lean_
|
|||
lean_object* l_Lean_Elab_Tactic_EStateM_Backtrackable___closed__3;
|
||||
lean_object* lean_usize_to_nat(size_t);
|
||||
lean_object* l_Lean_Elab_Tactic_getCurrMacroScope(lean_object*, lean_object*);
|
||||
extern lean_object* l___private_Init_Lean_Parser_Parser_28__BuiltinParserAttribute_add___closed__2;
|
||||
lean_object* l_Lean_Elab_Tactic_resettingSynthInstanceCache___rarg(lean_object*, lean_object*, lean_object*);
|
||||
extern lean_object* l_Lean_Parser_Tactic_seq___elambda__1___closed__1;
|
||||
lean_object* l___regBuiltinTactic_Lean_Elab_Tactic_evalNestedTacticBlockCurly___closed__2;
|
||||
|
|
@ -3178,7 +3178,7 @@ x_27 = l_Lean_Name_toStringWithSep___main(x_26, x_1);
|
|||
x_28 = l_Lean_Elab_Tactic_addBuiltinTactic___closed__1;
|
||||
x_29 = lean_string_append(x_28, x_27);
|
||||
lean_dec(x_27);
|
||||
x_30 = l___private_Init_Lean_Parser_Parser_18__throwParserCategoryAlreadyDefined___rarg___closed__2;
|
||||
x_30 = l___private_Init_Lean_Parser_Parser_16__throwParserCategoryAlreadyDefined___rarg___closed__2;
|
||||
x_31 = lean_string_append(x_29, x_30);
|
||||
x_32 = lean_alloc_ctor(18, 1, 0);
|
||||
lean_ctor_set(x_32, 0, x_31);
|
||||
|
|
@ -3283,7 +3283,7 @@ x_52 = l_Lean_Name_toStringWithSep___main(x_51, x_1);
|
|||
x_53 = l_Lean_Elab_Tactic_addBuiltinTactic___closed__1;
|
||||
x_54 = lean_string_append(x_53, x_52);
|
||||
lean_dec(x_52);
|
||||
x_55 = l___private_Init_Lean_Parser_Parser_18__throwParserCategoryAlreadyDefined___rarg___closed__2;
|
||||
x_55 = l___private_Init_Lean_Parser_Parser_16__throwParserCategoryAlreadyDefined___rarg___closed__2;
|
||||
x_56 = lean_string_append(x_54, x_55);
|
||||
x_57 = lean_alloc_ctor(18, 1, 0);
|
||||
lean_ctor_set(x_57, 0, x_56);
|
||||
|
|
@ -3602,7 +3602,7 @@ lean_dec(x_13);
|
|||
lean_dec(x_11);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
x_25 = l___private_Init_Lean_Parser_Parser_28__BuiltinParserAttribute_add___closed__2;
|
||||
x_25 = l___private_Init_Lean_Parser_Parser_27__BuiltinParserAttribute_add___closed__2;
|
||||
x_26 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_26, 0, x_25);
|
||||
lean_ctor_set(x_26, 1, x_12);
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ lean_object* l_Lean_Syntax_isNatLitAux(lean_object*, lean_object*);
|
|||
lean_object* l_Lean_Elab_Term_elabRawCharLit___closed__3;
|
||||
lean_object* l_PersistentArray_foldlMAux___main___at___private_Init_Lean_Elab_Term_3__fromMetaState___spec__2(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_elabNum___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
extern lean_object* l___private_Init_Lean_Parser_Parser_27__BuiltinParserAttribute_add___closed__2;
|
||||
lean_object* l___private_Init_Lean_Elab_Term_11__tryCoeSort___closed__1;
|
||||
extern lean_object* l_Lean_Parser_declareBuiltinParser___closed__8;
|
||||
lean_object* l_Lean_Elab_Term_State_inhabited;
|
||||
|
|
@ -475,6 +476,7 @@ lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabRawNumLit___closed__2;
|
|||
lean_object* l_Lean_Elab_Term_elabTermAux(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_termElabAttribute___closed__5;
|
||||
lean_object* l_Lean_Elab_mkElabAttribute___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
extern lean_object* l___private_Init_Lean_Parser_Parser_16__throwParserCategoryAlreadyDefined___rarg___closed__2;
|
||||
lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabArrayLit___closed__3;
|
||||
lean_object* l_Lean_Elab_Term_tryCoeAndLift___closed__2;
|
||||
lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabArrayLit(lean_object*);
|
||||
|
|
@ -706,7 +708,6 @@ lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabHole___closed__3;
|
|||
lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabTacticBlock___closed__2;
|
||||
lean_object* l_Lean_Elab_mkMessage___at_Lean_Elab_Term_throwError___spec__1(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_PersistentHashMap_find_x3f___at_Lean_Elab_Term_elabTermAux___main___spec__2___boxed(lean_object*, lean_object*);
|
||||
extern lean_object* l___private_Init_Lean_Parser_Parser_18__throwParserCategoryAlreadyDefined___rarg___closed__2;
|
||||
lean_object* l_Lean_Elab_Term_getOpenDecls___boxed(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_getTraceState___boxed(lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_throwTypeMismatchError___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -785,7 +786,6 @@ lean_object* l_Lean_SMap_empty___at_Lean_Elab_Term_mkBuiltinTermElabTable___spec
|
|||
lean_object* l_Lean_Elab_Term_mkTacticMVar(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* lean_usize_to_nat(size_t);
|
||||
uint8_t l_Array_isEqvAux___main___at_Lean_Elab_Term_withMVarContext___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
extern lean_object* l___private_Init_Lean_Parser_Parser_28__BuiltinParserAttribute_add___closed__2;
|
||||
lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabBadCDot___closed__2;
|
||||
lean_object* l_Lean_Elab_Term_elabRawCharLit___closed__4;
|
||||
extern lean_object* l_Lean_levelOne;
|
||||
|
|
@ -2847,7 +2847,7 @@ x_27 = l_Lean_Name_toStringWithSep___main(x_26, x_1);
|
|||
x_28 = l_Lean_Elab_Term_addBuiltinTermElab___closed__1;
|
||||
x_29 = lean_string_append(x_28, x_27);
|
||||
lean_dec(x_27);
|
||||
x_30 = l___private_Init_Lean_Parser_Parser_18__throwParserCategoryAlreadyDefined___rarg___closed__2;
|
||||
x_30 = l___private_Init_Lean_Parser_Parser_16__throwParserCategoryAlreadyDefined___rarg___closed__2;
|
||||
x_31 = lean_string_append(x_29, x_30);
|
||||
x_32 = lean_alloc_ctor(18, 1, 0);
|
||||
lean_ctor_set(x_32, 0, x_31);
|
||||
|
|
@ -2952,7 +2952,7 @@ x_52 = l_Lean_Name_toStringWithSep___main(x_51, x_1);
|
|||
x_53 = l_Lean_Elab_Term_addBuiltinTermElab___closed__1;
|
||||
x_54 = lean_string_append(x_53, x_52);
|
||||
lean_dec(x_52);
|
||||
x_55 = l___private_Init_Lean_Parser_Parser_18__throwParserCategoryAlreadyDefined___rarg___closed__2;
|
||||
x_55 = l___private_Init_Lean_Parser_Parser_16__throwParserCategoryAlreadyDefined___rarg___closed__2;
|
||||
x_56 = lean_string_append(x_54, x_55);
|
||||
x_57 = lean_alloc_ctor(18, 1, 0);
|
||||
lean_ctor_set(x_57, 0, x_56);
|
||||
|
|
@ -3279,7 +3279,7 @@ lean_dec(x_13);
|
|||
lean_dec(x_11);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
x_25 = l___private_Init_Lean_Parser_Parser_28__BuiltinParserAttribute_add___closed__2;
|
||||
x_25 = l___private_Init_Lean_Parser_Parser_27__BuiltinParserAttribute_add___closed__2;
|
||||
x_26 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_26, 0, x_25);
|
||||
lean_ctor_set(x_26, 1, x_12);
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ lean_object* l_Lean_registerTraceClass(lean_object*, lean_object*);
|
|||
lean_object* l___private_Init_Lean_Elab_Util_6__ElabAttribute_add___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
extern lean_object* l___private_Init_Lean_Environment_8__persistentEnvExtensionsRef;
|
||||
lean_object* l_AssocList_contains___main___at_Lean_Elab_ElabFnTable_insert___spec__26___rarg___boxed(lean_object*, lean_object*);
|
||||
extern lean_object* l___private_Init_Lean_Parser_Parser_27__BuiltinParserAttribute_add___closed__2;
|
||||
lean_object* lean_mk_empty_array_with_capacity(lean_object*);
|
||||
lean_object* l_Lean_SMap_insert___at_Lean_Elab_ElabFnTable_insert___spec__20___rarg(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_mkMacroAttribute(lean_object*);
|
||||
|
|
@ -338,7 +339,6 @@ lean_object* l___private_Init_Lean_Elab_Util_8__regTraceClasses___closed__1;
|
|||
lean_object* lean_usize_to_nat(size_t);
|
||||
lean_object* l_Lean_Elab_mkMacroAttribute___closed__2;
|
||||
lean_object* l_Lean_SMap_find_x3f___at_Lean_Elab_ElabFnTable_insert___spec__1(lean_object*);
|
||||
extern lean_object* l___private_Init_Lean_Parser_Parser_28__BuiltinParserAttribute_add___closed__2;
|
||||
lean_object* l_PersistentHashMap_empty___at_Lean_Elab_mkElabAttributeAux___spec__6(lean_object*);
|
||||
lean_object* l_Lean_SMap_empty___at_Lean_Elab_ElabAttribute_inhabited___spec__1___closed__3;
|
||||
lean_object* l_Lean_Elab_builtinMacroFnTable;
|
||||
|
|
@ -5864,7 +5864,7 @@ lean_dec(x_13);
|
|||
lean_dec(x_11);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
x_25 = l___private_Init_Lean_Parser_Parser_28__BuiltinParserAttribute_add___closed__2;
|
||||
x_25 = l___private_Init_Lean_Parser_Parser_27__BuiltinParserAttribute_add___closed__2;
|
||||
x_26 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_26, 0, x_25);
|
||||
lean_ctor_set(x_26, 1, x_12);
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -134,6 +134,7 @@ lean_object* l_Lean_Syntax_hasArgs___boxed(lean_object*);
|
|||
lean_object* l_Lean_mkStxNumLit(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Name_HasAppend___closed__1;
|
||||
lean_object* l_Array_mapSepElems___boxed(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_mkSepStx___boxed(lean_object*, lean_object*);
|
||||
uint8_t l_Lean_Name_hasMacroScopes(lean_object*);
|
||||
lean_object* l_Lean_Syntax_isLit_x3f(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Syntax_termIdToAntiquot___closed__4;
|
||||
|
|
@ -226,6 +227,7 @@ uint8_t l_Lean_Syntax_isAtom(lean_object*);
|
|||
lean_object* l_Lean_Name_toStringWithSep___main___boxed(lean_object*, lean_object*);
|
||||
lean_object* l___private_Init_LeanInit_7__decodeOctalLitAux___main___boxed(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_nullKind___closed__2;
|
||||
lean_object* l_Lean_mkSepStx(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_MacroM_monadQuotation___closed__3;
|
||||
uint8_t l_Lean_isLetterLike(uint32_t);
|
||||
lean_object* l_Lean_Syntax_isStrLit_x3f___boxed(lean_object*);
|
||||
|
|
@ -280,6 +282,7 @@ lean_object* l_Lean_Name_hasMacroScopes___boxed(lean_object*);
|
|||
lean_object* l_Lean_isIdBeginEscape___boxed(lean_object*);
|
||||
lean_object* l_Lean_mkStxStrLit(lean_object*, lean_object*);
|
||||
lean_object* lean_nat_mul(lean_object*, lean_object*);
|
||||
lean_object* l_Array_iterateMAux___main___at_Lean_mkSepStx___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Init_LeanInit_13__decodeNameLitAux___boxed(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Init_LeanInit_14__filterSepElemsMAux___main___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Init_LeanInit_14__filterSepElemsMAux___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -290,6 +293,7 @@ lean_object* l_Lean_Name_append___main___boxed(lean_object*, lean_object*);
|
|||
uint8_t l_Lean_Syntax_isNone(lean_object*);
|
||||
lean_object* l_Lean_mkTermIdFrom(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Syntax_decodeNameLit(lean_object*);
|
||||
lean_object* l_Array_iterateMAux___main___at_Lean_mkSepStx___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_mkOptionalNode___closed__1;
|
||||
lean_object* l_Lean_Syntax_isNameLit_x3f(lean_object*);
|
||||
lean_object* l_Lean_isIdEndEscape___boxed(lean_object*);
|
||||
|
|
@ -3047,6 +3051,82 @@ lean_ctor_set(x_3, 1, x_1);
|
|||
return x_3;
|
||||
}
|
||||
}
|
||||
lean_object* l_Array_iterateMAux___main___at_Lean_mkSepStx___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_6; uint8_t x_7;
|
||||
x_6 = lean_array_get_size(x_3);
|
||||
x_7 = lean_nat_dec_lt(x_4, x_6);
|
||||
lean_dec(x_6);
|
||||
if (x_7 == 0)
|
||||
{
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_2);
|
||||
return x_5;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_8; lean_object* x_9; uint8_t x_10; lean_object* x_11; lean_object* x_12;
|
||||
x_8 = lean_array_fget(x_3, x_4);
|
||||
x_9 = lean_unsigned_to_nat(0u);
|
||||
x_10 = lean_nat_dec_lt(x_9, x_4);
|
||||
x_11 = lean_unsigned_to_nat(1u);
|
||||
x_12 = lean_nat_add(x_4, x_11);
|
||||
lean_dec(x_4);
|
||||
if (x_10 == 0)
|
||||
{
|
||||
lean_object* x_13;
|
||||
x_13 = lean_array_push(x_5, x_8);
|
||||
x_4 = x_12;
|
||||
x_5 = x_13;
|
||||
goto _start;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_15; lean_object* x_16;
|
||||
lean_inc(x_2);
|
||||
x_15 = lean_array_push(x_5, x_2);
|
||||
x_16 = lean_array_push(x_15, x_8);
|
||||
x_4 = x_12;
|
||||
x_5 = x_16;
|
||||
goto _start;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_mkSepStx(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_unsigned_to_nat(0u);
|
||||
x_4 = l_Array_empty___closed__1;
|
||||
x_5 = l_Array_iterateMAux___main___at_Lean_mkSepStx___spec__1(x_1, x_2, x_1, x_3, x_4);
|
||||
x_6 = l_Lean_nullKind;
|
||||
x_7 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_7, 0, x_6);
|
||||
lean_ctor_set(x_7, 1, x_5);
|
||||
return x_7;
|
||||
}
|
||||
}
|
||||
lean_object* l_Array_iterateMAux___main___at_Lean_mkSepStx___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_6;
|
||||
x_6 = l_Array_iterateMAux___main___at_Lean_mkSepStx___spec__1(x_1, x_2, x_3, x_4, x_5);
|
||||
lean_dec(x_3);
|
||||
lean_dec(x_1);
|
||||
return x_6;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_mkSepStx___boxed(lean_object* x_1, lean_object* x_2) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_3;
|
||||
x_3 = l_Lean_mkSepStx(x_1, x_2);
|
||||
lean_dec(x_1);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
lean_object* _init_l_Lean_mkOptionalNode___closed__1() {
|
||||
_start:
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue