chore: update stage0
This commit is contained in:
parent
d07796293b
commit
f600c67bb4
30 changed files with 51005 additions and 5534 deletions
|
|
@ -120,6 +120,9 @@ a
|
|||
issues when proving equational theorems. The equation Compiler uses it as a marker. -/
|
||||
@[macroInline, reducible] def idRhs (α : Sort u) (a : α) : α := a
|
||||
|
||||
/-- Auxiliary Declaration used to implement the named patterns `x@p` -/
|
||||
@[reducible] def namedPattern {α : Sort u} (x a : α) : α := a
|
||||
|
||||
inductive PUnit : Sort u
|
||||
| unit : PUnit
|
||||
|
||||
|
|
|
|||
|
|
@ -368,6 +368,14 @@ namespace Substring
|
|||
| ⟨s, b, _⟩, p =>
|
||||
if p = b then p else s.prev (b+p) - b
|
||||
|
||||
def nextn : Substring → Nat → String.Pos → String.Pos
|
||||
| ss, 0, p => p
|
||||
| ss, i+1, p => ss.nextn i (ss.next p)
|
||||
|
||||
def prevn : Substring → String.Pos → Nat → String.Pos
|
||||
| ss, 0, p => p
|
||||
| ss, i+1, p => ss.prevn i (ss.prev p)
|
||||
|
||||
@[inline] def front (s : Substring) : Char :=
|
||||
s.get 0
|
||||
|
||||
|
|
@ -376,24 +384,16 @@ match s with
|
|||
| ⟨s, b, e⟩ => (String.posOfAux s c e b) - b
|
||||
|
||||
@[inline] def drop : Substring → Nat → Substring
|
||||
| ⟨s, b, e⟩, n =>
|
||||
if b + n ≥ e then "".toSubstring
|
||||
else ⟨s, b+n, e⟩
|
||||
| ss@⟨s, b, e⟩, n => ⟨s, ss.nextn n b, e⟩
|
||||
|
||||
@[inline] def dropRight : Substring → Nat → Substring
|
||||
| ⟨s, b, e⟩, n =>
|
||||
if e - n ≤ b then "".toSubstring
|
||||
else ⟨s, b, e - n⟩
|
||||
| ss@⟨s, b, e⟩, n => ⟨s, b, ss.prevn n e⟩
|
||||
|
||||
@[inline] def take : Substring → Nat → Substring
|
||||
| ⟨s, b, e⟩, n =>
|
||||
let e := if b + n ≥ e then e else b + n;
|
||||
⟨s, b, e⟩
|
||||
| ss@⟨s, b, e⟩, n => ⟨s, b, ss.nextn n b⟩
|
||||
|
||||
@[inline] def takeRight : Substring → Nat → Substring
|
||||
| ⟨s, b, e⟩, n =>
|
||||
let b := if e - n ≤ b then b else e - n;
|
||||
⟨s, b, e⟩
|
||||
| ss@⟨s, b, e⟩, n => ⟨s, ss.prevn n e, e⟩
|
||||
|
||||
@[inline] def atEnd : Substring → String.Pos → Bool
|
||||
| ⟨s, b, e⟩, p => b + p == e
|
||||
|
|
|
|||
|
|
@ -761,6 +761,15 @@ match stx with
|
|||
| id@(Syntax.ident _ _ _ _) => if relaxed then some (id, mkNullNode) else none
|
||||
| _ => none
|
||||
|
||||
def getIdOfTermId (stx : Syntax) : Name :=
|
||||
match stx with
|
||||
| Syntax.node k args =>
|
||||
if k == `Lean.Parser.Term.id && args.size == 2 then
|
||||
(args.get! 0).getId
|
||||
else
|
||||
Name.anonymous
|
||||
| _ => Name.anonymous
|
||||
|
||||
/-- Similar to `isTermId?`, but succeeds only if the optional part is a `none`. -/
|
||||
def isSimpleTermId? (stx : Syntax) (relaxed : Bool := false) : Option Syntax :=
|
||||
match stx.isTermId? relaxed with
|
||||
|
|
|
|||
|
|
@ -531,6 +531,8 @@ private partial def elabAppFn (ref : Syntax) : Syntax → List LVal → Array Na
|
|||
elabAppFn e (newLVals ++ lvals) namedArgs args expectedType? explicit acc
|
||||
| `($e[$idx]) =>
|
||||
elabAppFn e (LVal.getOp idx :: lvals) namedArgs args expectedType? explicit acc
|
||||
| `($id:ident@$t:term) =>
|
||||
throwError ref "unexpected occurrence of named pattern"
|
||||
| `($id:ident$us:explicitUniv*) => do
|
||||
-- Remark: `id.<namedPattern>` should already have been expanded
|
||||
us ← if us.isEmpty then pure [] else elabExplicitUniv (us.get! 0);
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@ Released under Apache 2.0 license as described in the file LICENSE.
|
|||
Authors: Leonardo de Moura
|
||||
-/
|
||||
import Lean.Elab.Term
|
||||
import Lean.Meta.EqnCompiler.MatchPattern
|
||||
import Lean.Meta.EqnCompiler.DepElim
|
||||
|
||||
namespace Lean
|
||||
namespace Elab
|
||||
|
|
@ -21,18 +23,19 @@ withPosition $ fun pos =>
|
|||
(if optionalFirstBar then optional "| " else "| ") >>
|
||||
sepBy1 matchAlt (checkColGe pos.column "alternatives must be indented" >> "|")
|
||||
|
||||
def matchDiscr := optIdent >> termParser
|
||||
def matchDiscr := parser! optional (try (ident >> checkNoWsBefore "no space before ':'" >> ":")) >> termParser
|
||||
|
||||
def «match» := parser!:leadPrec "match " >> sepBy1 matchDiscr ", " >> optType >> " with " >> matchAlts
|
||||
```
|
||||
-/
|
||||
|
||||
structure MatchAltView :=
|
||||
(ref : Syntax)
|
||||
(patterns : Array Syntax)
|
||||
(rhs : Syntax)
|
||||
|
||||
def mkMatchAltView (matchAlt : Syntax) : MatchAltView :=
|
||||
{ patterns := (matchAlt.getArg 0).getArgs.getSepElems, rhs := matchAlt.getArg 2 }
|
||||
{ ref := matchAlt, patterns := (matchAlt.getArg 0).getArgs.getSepElems, rhs := matchAlt.getArg 2 }
|
||||
|
||||
private def expandSimpleMatch (stx discr lhsVar rhs : Syntax) (expectedType? : Option Expr) : TermElabM Expr := do
|
||||
newStx ← `(let $lhsVar := $discr; $rhs);
|
||||
|
|
@ -52,6 +55,29 @@ if optType.isNone then
|
|||
else
|
||||
pure $ (optType.getArg 0).getArg 1
|
||||
|
||||
private def elabMatchOptType (matchStx : Syntax) (numDiscrs : Nat) : TermElabM Expr := do
|
||||
typeStx ← liftMacroM $ expandMatchOptType matchStx (matchStx.getArg 2) numDiscrs;
|
||||
elabType typeStx
|
||||
|
||||
private partial def elabDiscrsAux (ref : Syntax) (discrStxs : Array Syntax) (expectedType : Expr) : Nat → Expr → Array Expr → TermElabM (Array Expr)
|
||||
| i, matchType, discrs =>
|
||||
if h : i < discrStxs.size then do
|
||||
let discrStx := discrStxs.get ⟨i, h⟩;
|
||||
matchType ← whnf ref matchType;
|
||||
match matchType with
|
||||
| Expr.forallE _ d b _ => do
|
||||
discr ← elabTerm discrStx d;
|
||||
discr ← ensureHasType discrStx d discr;
|
||||
elabDiscrsAux (i+1) (b.instantiate1 discr) (discrs.push discr)
|
||||
| _ => throwError ref ("invalid type provided to match-expression, function type with arity #" ++ toString discrStxs ++ " expected")
|
||||
else do
|
||||
unlessM (isDefEq ref matchType expectedType) $
|
||||
throwError ref ("invalid result type provided to match-expression" ++ indentExpr matchType ++ Format.line ++ "expected type" ++ indentExpr expectedType);
|
||||
pure discrs
|
||||
|
||||
private def elabDiscrs (ref : Syntax) (discrStxs : Array Syntax) (matchType : Expr) (expectedType : Expr) : TermElabM (Array Expr) :=
|
||||
elabDiscrsAux ref discrStxs expectedType 0 matchType #[]
|
||||
|
||||
/-
|
||||
nodeWithAntiquot "matchAlt" `Lean.Parser.Term.matchAlt $ sepBy1 termParser ", " >> darrow >> termParser
|
||||
-/
|
||||
|
|
@ -66,6 +92,249 @@ private def getMatchAlts (stx : Syntax) : Array MatchAltView :=
|
|||
let alts : Array Syntax := (stx.getArg 5).getArgs.filter fun alt => alt.getKind == `Lean.Parser.Term.matchAlt;
|
||||
alts.map mkMatchAltView
|
||||
|
||||
inductive PatternVar
|
||||
| localVar (userName : Name)
|
||||
-- anonymous variables (`_`) are encoded using metavariables
|
||||
| anonymousVar (mvarUserName : Name)
|
||||
|
||||
instance PatternVar.hasToString : HasToString PatternVar :=
|
||||
⟨fun v => match v with
|
||||
| PatternVar.localVar x => toString x
|
||||
| PatternVar.anonymousVar x => "?" ++ toString x⟩
|
||||
|
||||
/-
|
||||
Patterns define new local variables.
|
||||
This module collect them and preprocess `_` occurring in patterns.
|
||||
Recall that an `_` may represent anonymous variables or inaccessible terms
|
||||
that implied by typing constraints. Thus, we represent them with fresh named holes `?x`.
|
||||
After we elaborate the pattern, if the metavariable remains unassigned, we transform it into
|
||||
a regular pattern variable. Otherwise, it becomes an inaccessible term.
|
||||
|
||||
Macros occurring in patterns are expanded before the `collectPatternVars` method is executed.
|
||||
The following kinds of Syntax are handled by this module
|
||||
- Constructor applications
|
||||
- Applications of functions tagged with the `[matchPattern]` attribute
|
||||
- Identifiers
|
||||
- Anonymous constructors
|
||||
- Structure instances
|
||||
- Inaccessible terms
|
||||
- Named patterns
|
||||
- Tuple literals
|
||||
- Type ascriptions
|
||||
- Literals: num, string and char
|
||||
-/
|
||||
namespace CollectPatternVars
|
||||
|
||||
structure State :=
|
||||
(found : NameSet := {})
|
||||
(vars : Array PatternVar := #[])
|
||||
|
||||
abbrev M := StateT State TermElabM
|
||||
|
||||
private def throwCtorExpected {α} (stx : Syntax) : M α :=
|
||||
liftM $ throwError stx "invalid pattern, constructor or constant marked with '[matchPattern]' expected"
|
||||
|
||||
private def getNumExplicitCtorParams (ref : Syntax) (ctorVal : ConstructorVal) : TermElabM Nat :=
|
||||
liftMetaM ref $ Meta.forallBoundedTelescope ctorVal.type ctorVal.nparams fun ps _ =>
|
||||
ps.foldlM
|
||||
(fun acc p => do
|
||||
localDecl ← Meta.getLocalDecl p.fvarId!;
|
||||
if localDecl.binderInfo.isExplicit then pure $ acc+1 else pure acc)
|
||||
0
|
||||
|
||||
private def throwAmbiguous {α} (ref : Syntax) (fs : List Expr) : M α :=
|
||||
liftM $ throwError ref ("ambiguous pattern, use fully qualified name, possible interpretations " ++ fs)
|
||||
|
||||
private def processVar (ref : Syntax) (id : Name) (mustBeCtor : Bool := false) : M Unit := do
|
||||
when mustBeCtor $ throwCtorExpected ref;
|
||||
unless id.eraseMacroScopes.isAtomic $ liftM $ throwError ref "invalid pattern variable, must be atomic";
|
||||
s ← get;
|
||||
when (s.found.contains id) $ liftM $ throwError ref ("invalid pattern, variable '" ++ id ++ "' occurred more than once");
|
||||
modify fun s => { s with vars := s.vars.push (PatternVar.localVar id), found := s.found.insert id }
|
||||
|
||||
/- Check whether `stx` is a pattern variable or constructor-like (i.e., constructor or constant tagged with `[matchPattern]` attribute)
|
||||
If `mustBeCtor == true`, then `stx` cannot be a pattern variable.
|
||||
|
||||
If `stx` is a constructor, then return the number of explicit arguments that are inductive type parameters. -/
|
||||
private def processIdAux (stx : Syntax) (mustBeCtor : Bool) : M Nat := do
|
||||
env ← liftM $ getEnv;
|
||||
match stx.isTermId? true with
|
||||
| none => throwCtorExpected stx
|
||||
| some (id, opt) => do
|
||||
when ((opt.getArg 0).isOfKind `Lean.Parser.Term.namedPattern) $
|
||||
liftM $ throwError stx "invalid occurrence of named pattern";
|
||||
match id with
|
||||
| Syntax.ident _ _ val preresolved => do
|
||||
rs ← liftM $ catch (resolveName stx val preresolved []) (fun _ => pure []);
|
||||
let rs := rs.filter fun ⟨f, projs⟩ => projs.isEmpty;
|
||||
let fs := rs.map fun ⟨f, _⟩ => f;
|
||||
match fs with
|
||||
| [] => do processVar stx id.getId mustBeCtor; pure 0
|
||||
| [f] => match f with
|
||||
| Expr.const fName _ _ =>
|
||||
match env.find? fName with
|
||||
| some $ ConstantInfo.ctorInfo val => liftM $ getNumExplicitCtorParams stx val
|
||||
| some $ info =>
|
||||
if EqnCompiler.hasMatchPatternAttribute env fName then pure 0
|
||||
else do processVar stx id.getId mustBeCtor; pure 0
|
||||
| none => throwCtorExpected stx
|
||||
| _ => do processVar stx id.getId mustBeCtor; pure 0
|
||||
| _ => throwAmbiguous stx fs
|
||||
| _ => unreachable!
|
||||
|
||||
private def processCtor (stx : Syntax) : M Nat :=
|
||||
processIdAux stx true
|
||||
|
||||
private def processId (stx : Syntax) : M Unit := do
|
||||
_ ← processIdAux stx false; pure ()
|
||||
|
||||
private def throwInvalidPattern {α} (stx : Syntax) : M α :=
|
||||
liftM $ throwError stx "invalid pattern"
|
||||
|
||||
private partial def collect : Syntax → M Syntax
|
||||
| stx@(Syntax.node k args) => withFreshMacroScope $
|
||||
if k == `Lean.Parser.Term.app then do
|
||||
let appFn := args.get! 0;
|
||||
let appArgs := (args.get! 1).getArgs;
|
||||
appArgs.forM fun appArg =>
|
||||
when (appArg.isOfKind `Lean.Parser.Term.namedPattern) $
|
||||
liftM $ throwError appArg "named parameters are not allowed in patterns";
|
||||
/- We must skip explict inducitve datatype parameters since they are by defaul inaccessible.
|
||||
Example: `A` is inaccessible term at `Sum.inl A b` -/
|
||||
numArgsToSkip ← processCtor appFn;
|
||||
appArgs ← appArgs.mapIdxM fun i arg => if i < numArgsToSkip then pure arg else collect arg;
|
||||
pure $ Syntax.node k $ args.set! 1 (mkNullNode appArgs)
|
||||
else if k == `Lean.Parser.Term.anonymousCtor then do
|
||||
elems ← (args.get! 1).getArgs.mapSepElemsM $ collect;
|
||||
pure $ Syntax.node k $ args.set! 1 $ mkNullNode elems
|
||||
else if k == `Lean.Parser.Term.structInst then do
|
||||
/- { " >> optional (try (termParser >> " with ")) >> sepBy structInstField ", " true >> optional ".." >> optional (" : " >> termParser) >> " }" -/
|
||||
let withMod := args.get! 1;
|
||||
unless withMod.isNone $
|
||||
liftM $ throwError withMod "invalid struct instance pattern, 'with' is not allowed in patterns";
|
||||
let fields := (args.get! 2).getArgs;
|
||||
fields ← fields.mapSepElemsM fun field => do {
|
||||
-- parser! structInstLVal >> " := " >> termParser
|
||||
newVal ← collect (field.getArg 2);
|
||||
pure $ field.setArg 2 newVal
|
||||
};
|
||||
pure $ Syntax.node k $ args.set! 2 $ mkNullNode fields
|
||||
else if k == `Lean.Parser.Term.hole then do
|
||||
r ← `(?x);
|
||||
modify fun s => { s with vars := s.vars.push $ PatternVar.anonymousVar $ (r.getArg 1).getId };
|
||||
pure r
|
||||
else if k == `Lean.Parser.Term.paren then
|
||||
let arg := args.get! 1;
|
||||
if arg.isNone then
|
||||
pure stx -- `()`
|
||||
else do
|
||||
let t := arg.getArg 0;
|
||||
let s := arg.getArg 1;
|
||||
if s.isNone || (s.getArg 0).isOfKind `Lean.Parser.Term.typeAscription then do
|
||||
-- Ignore `s`, since it empty or it is a type ascription
|
||||
t ← collect t;
|
||||
let arg := arg.setArg 0 t;
|
||||
pure $ Syntax.node k $ args.set! 1 arg
|
||||
else do
|
||||
-- Tuple literal is a constructor
|
||||
t ← collect t;
|
||||
let arg := arg.setArg 0 t;
|
||||
let tupleTail := s.getArg 0;
|
||||
let tupleTailElems := (tupleTail.getArg 1).getArgs;
|
||||
tupleTailElems ← tupleTailElems.mapSepElemsM collect;
|
||||
let tupleTail := tupleTail.setArg 1 $ mkNullNode tupleTailElems;
|
||||
let s := s.setArg 0 tupleTail;
|
||||
let arg := arg.setArg 1 s;
|
||||
pure $ Syntax.node k $ args.set! 1 arg
|
||||
else if k == `Lean.Parser.Term.id then do
|
||||
let extra := args.get! 1;
|
||||
if extra.isNone then do
|
||||
processId stx;
|
||||
pure stx
|
||||
else if (extra.getArg 0).isOfKind `Lean.Parser.Term.explicitUniv then do
|
||||
_ ← processCtor stx;
|
||||
pure stx
|
||||
else if (extra.getArg 0).isOfKind `Lean.Parser.Term.namedPattern then do
|
||||
/- Recall that
|
||||
def namedPattern := checkNoWsBefore "no space before '@'" >> parser! "@" >> termParser maxPrec
|
||||
def id := parser! ident >> optional (explicitUniv <|> namedPattern) -/
|
||||
let id := stx.getIdOfTermId;
|
||||
processVar stx id;
|
||||
let pat := (extra.getArg 0).getArg 1;
|
||||
pat ← collect pat;
|
||||
`(namedPattern $(mkTermIdFrom stx id) $pat)
|
||||
else
|
||||
throwInvalidPattern stx
|
||||
else if k == `Lean.Parser.Term.inaccessible then
|
||||
pure stx
|
||||
else if k == `Lean.Parser.Term.str then
|
||||
pure stx
|
||||
else if k == `Lean.Parser.Term.num then
|
||||
pure stx
|
||||
else if k == `Lean.Parser.Term.char then
|
||||
pure stx
|
||||
else if k == choiceKind then
|
||||
liftM $ throwError stx "invalid pattern, notation is ambiguous"
|
||||
else
|
||||
throwInvalidPattern stx
|
||||
| stx@(Syntax.ident _ _ _ _) => do
|
||||
processId stx;
|
||||
pure stx
|
||||
| stx =>
|
||||
throwInvalidPattern stx
|
||||
|
||||
def main (alt : MatchAltView) : M MatchAltView := do
|
||||
patterns ← alt.patterns.mapM fun p => do {
|
||||
liftM $ trace `Elab.match p fun _ => "collecting variables at pattern: " ++ p;
|
||||
collect p
|
||||
};
|
||||
pure { alt with patterns := patterns }
|
||||
|
||||
end CollectPatternVars
|
||||
|
||||
private def collectPatternVars (alt : MatchAltView) : TermElabM (Array PatternVar × MatchAltView) := do
|
||||
(alt, s) ← (CollectPatternVars.main alt).run {};
|
||||
pure (s.vars, alt)
|
||||
|
||||
private partial def withPatternVarsAux {α} (ref : Syntax) (pVars : Array PatternVar) (k : TermElabM α) : Nat → TermElabM α
|
||||
| i =>
|
||||
if h : i < pVars.size then
|
||||
match pVars.get ⟨i, h⟩ with
|
||||
| PatternVar.anonymousVar _ => withPatternVarsAux (i+1)
|
||||
| PatternVar.localVar userName => do
|
||||
type ← mkFreshTypeMVar ref;
|
||||
withLocalDecl ref userName BinderInfo.default type fun _ => withPatternVarsAux (i+1)
|
||||
else
|
||||
k
|
||||
|
||||
private def withPatternVars {α} (ref : Syntax) (pVars : Array PatternVar) (k : TermElabM α) : TermElabM α :=
|
||||
withPatternVarsAux ref pVars k 0
|
||||
|
||||
private partial def elabPatternsAux (ref : Syntax) (patternStxs : Array Syntax) : Nat → Expr → Array Expr → TermElabM (Array Expr)
|
||||
| i, matchType, patterns =>
|
||||
if h : i < patternStxs.size then do
|
||||
matchType ← whnf ref matchType;
|
||||
match matchType with
|
||||
| Expr.forallE _ d b _ => do
|
||||
pattern ← elabTerm (patternStxs.get ⟨i, h⟩) d;
|
||||
elabPatternsAux (i+1) (b.instantiate1 pattern) (patterns.push pattern)
|
||||
| _ => throwError ref "unexpected match type"
|
||||
else
|
||||
pure patterns
|
||||
|
||||
private def elabPatterns (ref : Syntax) (patternStxs : Array Syntax) (matchType : Expr) : TermElabM (Array Expr) := do
|
||||
patterns ← elabPatternsAux ref patternStxs 0 matchType #[];
|
||||
trace `Elab.match ref fun _ => "patterns: " ++ patterns;
|
||||
pure patterns
|
||||
|
||||
def elabMatchAltView (alt : MatchAltView) (matchType : Expr) : TermElabM (Meta.DepElim.AltLHS × Expr) := do
|
||||
(patternVars, alt) ← collectPatternVars alt;
|
||||
trace `Elab.match alt.ref fun _ => "patternVars: " ++ toString patternVars;
|
||||
withPatternVars alt.ref patternVars do
|
||||
ps ← elabPatterns alt.ref alt.patterns matchType;
|
||||
-- TODO
|
||||
pure (⟨[], []⟩, arbitrary _)
|
||||
|
||||
/-
|
||||
```
|
||||
parser!:leadPrec "match " >> sepBy1 matchDiscr ", " >> optType >> " with " >> matchAlts
|
||||
|
|
@ -74,15 +343,106 @@ Remark the `optIdent` must be `none` at `matchDiscr`. They are expanded by `expa
|
|||
-/
|
||||
private def elabMatchCore (stx : Syntax) (expectedType? : Option Expr) : TermElabM Expr := do
|
||||
tryPostponeIfNoneOrMVar expectedType?;
|
||||
let discrs := (stx.getArg 1).getArgs.getSepElems.map fun d => d.getArg 1;
|
||||
typeStx ← liftMacroM $ expandMatchOptType stx (stx.getArg 2) discrs.size;
|
||||
type ← elabType typeStx;
|
||||
expectedType ← match expectedType? with
|
||||
| some expectedType => pure expectedType
|
||||
| none => mkFreshTypeMVar stx;
|
||||
let discrStxs := (stx.getArg 1).getArgs.getSepElems.map fun d => d.getArg 1;
|
||||
matchType ← elabMatchOptType stx discrStxs.size;
|
||||
matchAlts ← expandMacrosInPatterns $ getMatchAlts stx;
|
||||
throwError stx ("WIP type: " ++ type ++ "\n" ++ toString discrs ++ "\n" ++ toString (matchAlts.map fun alt => toString alt.patterns))
|
||||
discrs ← elabDiscrs stx discrStxs matchType expectedType;
|
||||
alts ← matchAlts.mapM $ fun alt => elabMatchAltView alt matchType;
|
||||
throwError stx ("WIP type: " ++ matchType ++ "\n" ++ discrs ++ "\n" ++ toString (matchAlts.map fun alt => toString alt.patterns))
|
||||
|
||||
/- Auxiliary method for `expandMatchDiscr?` -/
|
||||
private partial def mkMatchType (discrs : Array Syntax) : Nat → MacroM Syntax
|
||||
| i => withFreshMacroScope $
|
||||
if h : i < discrs.size then
|
||||
let discr := discrs.get ⟨i, h⟩;
|
||||
if discr.isOfKind `Lean.Parser.Term.matchDiscr then do
|
||||
type ← mkMatchType (i+1);
|
||||
if (discr.getArg 0).isNone then
|
||||
`(_ → $type)
|
||||
else
|
||||
let t := discr.getArg 1;
|
||||
`((x : _) → x = $t → $type)
|
||||
else
|
||||
mkMatchType (i+1)
|
||||
else
|
||||
`(_)
|
||||
|
||||
private def mkOptType (typeStx : Syntax) : Syntax :=
|
||||
mkNullNode #[mkNode `Lean.Parser.Term.typeSpec #[mkAtomFrom typeStx ", ", typeStx]]
|
||||
|
||||
/- Auxiliary method for `expandMatchDiscr?` -/
|
||||
private partial def mkNewDiscrs (discrs : Array Syntax) : Nat → Array Syntax → MacroM (Array Syntax)
|
||||
| i, newDiscrs =>
|
||||
if h : i < discrs.size then
|
||||
let discr := discrs.get ⟨i, h⟩;
|
||||
if discr.isOfKind `Lean.Parser.Term.matchDiscr then do
|
||||
if (discr.getArg 0).isNone then
|
||||
mkNewDiscrs (i+1) (newDiscrs.push discr)
|
||||
else do
|
||||
let newDiscrs := newDiscrs.push $ discr.setArg 0 mkNullNode;
|
||||
let newDiscrs := newDiscrs.push $ mkAtomFrom discr ", ";
|
||||
eqPrf ← `(Eq.refl _);
|
||||
let newDiscrs := newDiscrs.push $ mkNode `Lean.Parser.Term.matchDiscr #[mkNullNode, eqPrf];
|
||||
mkNewDiscrs (i+1) newDiscrs
|
||||
else
|
||||
mkNewDiscrs (i+1) (newDiscrs.push discr)
|
||||
else
|
||||
pure newDiscrs
|
||||
|
||||
/- Auxiliary method for `expandMatchDiscr?` -/
|
||||
private partial def mkNewPatterns (ref : Syntax) (discrs patterns : Array Syntax) : Nat → Array Syntax → MacroM (Array Syntax)
|
||||
| i, newPatterns =>
|
||||
if h : i < discrs.size then
|
||||
let discr := discrs.get ⟨i, h⟩;
|
||||
if h : i < patterns.size then
|
||||
let pattern := patterns.get ⟨i, h⟩;
|
||||
if discr.isOfKind `Lean.Parser.Term.matchDiscr then do
|
||||
if (discr.getArg 0).isNone then
|
||||
mkNewPatterns (i+1) (newPatterns.push pattern)
|
||||
else
|
||||
let newPatterns := newPatterns.push pattern;
|
||||
let newPatterns := newPatterns.push $ mkAtomFrom pattern ", ";
|
||||
let ident := (discr.getArg 0).getArg 0;
|
||||
let newPatterns := newPatterns.push $ mkTermIdFromIdent ident;
|
||||
mkNewPatterns (i+1) newPatterns
|
||||
else
|
||||
-- it is a ", "
|
||||
mkNewPatterns (i+1) (newPatterns.push pattern)
|
||||
else
|
||||
throw $ Macro.Exception.error ref ("invalid number of patterns, expected #" ++ toString discrs.size)
|
||||
else
|
||||
pure newPatterns
|
||||
|
||||
/- Auxiliary method for `expandMatchDiscr?` -/
|
||||
private partial def mkNewAlt (discrs : Array Syntax) (alt : Syntax) : MacroM Syntax := do
|
||||
let patterns := (alt.getArg 0).getArgs;
|
||||
newPatterns ← mkNewPatterns alt discrs patterns 0 #[];
|
||||
pure $ alt.setArg 0 (mkNullNode newPatterns)
|
||||
|
||||
/- Auxiliary method for `expandMatchDiscr?` -/
|
||||
private partial def mkNewAlts (discrs : Array Syntax) (alts : Array Syntax) : MacroM (Array Syntax) :=
|
||||
alts.mapSepElemsM $ mkNewAlt discrs
|
||||
|
||||
/-- Expand discriminants of the form `h : t` -/
|
||||
private def expandMatchDiscr? (stx : Syntax) : MacroM (Option Syntax) := do
|
||||
pure none -- TODO
|
||||
let discrs := (stx.getArg 1).getArgs;
|
||||
if discrs.getSepElems.all fun d => (d.getArg 0).isNone then
|
||||
pure none -- nothing to be done
|
||||
else do
|
||||
unless (stx.getArg 2).isNone $
|
||||
throw $ Macro.Exception.error (stx.getArg 2) "match expected type should not be provided when discriminants with equality proofs are used";
|
||||
matchType ← mkMatchType discrs 0;
|
||||
let matchType := matchType.copyInfo stx;
|
||||
let stx := stx.setArg 2 (mkOptType matchType);
|
||||
newDiscrs ← mkNewDiscrs discrs 0 #[];
|
||||
let stx := stx.setArg 1 (mkNullNode newDiscrs);
|
||||
let alts := (stx.getArg 5).getArgs;
|
||||
newAlts ← mkNewAlts discrs alts;
|
||||
let stx := stx.setArg 5 (mkNullNode newAlts);
|
||||
pure stx
|
||||
|
||||
-- parser! "match " >> sepBy1 termParser ", " >> optType >> " with " >> matchAlts
|
||||
@[builtinTermElab «match»] def elabMatch : TermElab :=
|
||||
|
|
@ -97,6 +457,10 @@ fun stx expectedType? => match_syntax stx with
|
|||
| some stxNew => withMacroExpansion stx stxNew $ elabTerm stxNew expectedType?
|
||||
| none => elabMatchCore stx expectedType?
|
||||
|
||||
@[init] private def regTraceClasses : IO Unit := do
|
||||
registerTraceClass `Elab.match;
|
||||
pure ()
|
||||
|
||||
end Term
|
||||
end Elab
|
||||
end Lean
|
||||
|
|
|
|||
|
|
@ -1117,23 +1117,20 @@ fun stx expectedType? =>
|
|||
withMacroExpansion stx pairs (elabTerm pairs expectedType?)
|
||||
| _ => throwError stx "unexpected parentheses notation"
|
||||
|
||||
@[builtinTermElab «listLit»] def elabListLit : TermElab :=
|
||||
fun stx expectedType? => do
|
||||
@[builtinMacro Lean.Parser.Term.listLit] def expandListLit : Macro :=
|
||||
fun stx =>
|
||||
let openBkt := stx.getArg 0;
|
||||
let args := stx.getArg 1;
|
||||
let closeBkt := stx.getArg 2;
|
||||
let consId := mkTermIdFrom openBkt `List.cons;
|
||||
let nilId := mkTermIdFrom closeBkt `List.nil;
|
||||
let newStx := args.foldSepRevArgs (fun arg r => mkAppStx consId #[arg, r]) nilId;
|
||||
withMacroExpansion stx newStx $ elabTerm newStx expectedType?
|
||||
pure $ args.foldSepRevArgs (fun arg r => mkAppStx consId #[arg, r]) nilId
|
||||
|
||||
@[builtinTermElab «arrayLit»] def elabArrayLit : TermElab :=
|
||||
fun stx expectedType? => do
|
||||
@[builtinMacro Lean.Parser.Term.arrayLit] def expandArrayLit : Macro :=
|
||||
fun stx =>
|
||||
match_syntax stx with
|
||||
| `(#[$args*]) => do
|
||||
newStx ← `(List.toArray [$args*]);
|
||||
withMacroExpansion stx newStx (elabTerm newStx expectedType?)
|
||||
| _ => throwError stx "unexpected array literal syntax"
|
||||
| `(#[$args*]) => `(List.toArray [$args*])
|
||||
| _ => throw $ Macro.Exception.error stx "unexpected array literal syntax"
|
||||
|
||||
private partial def resolveLocalNameAux (lctx : LocalContext) : Name → List String → Option (Expr × List String)
|
||||
| n, projs =>
|
||||
|
|
@ -1196,7 +1193,7 @@ result? ← resolveLocalName n;
|
|||
match result? with
|
||||
| some (e, projs) => do
|
||||
unless explicitLevels.isEmpty $
|
||||
throwError ref ("invalid use of explicit universe parameters, '" ++ toString e.fvarId! ++ "' is a local");
|
||||
throwError ref ("invalid use of explicit universe parameters, '" ++ e ++ "' is a local");
|
||||
pure [(e, projs)]
|
||||
| none =>
|
||||
let process (candidates : List (Name × List String)) : TermElabM (List (Expr × List String)) := do {
|
||||
|
|
|
|||
|
|
@ -10,3 +10,14 @@ import Lean.Parser.Tactic
|
|||
import Lean.Parser.Command
|
||||
import Lean.Parser.Module
|
||||
import Lean.Parser.Syntax
|
||||
|
||||
namespace Lean
|
||||
namespace Parser
|
||||
|
||||
-- Close the mutual recursion loop; see corresponding `[extern]` in the parenthesizer.
|
||||
@[export lean_mk_antiquot_parenthesizer]
|
||||
def mkAntiquot.parenthesizer' (name : String) (kind : Option SyntaxNodeKind) (anonymous := true) : PrettyPrinter.Parenthesizer :=
|
||||
mkAntiquot.parenthesizer name kind anonymous
|
||||
|
||||
end Parser
|
||||
end Lean
|
||||
|
|
|
|||
|
|
@ -1616,6 +1616,18 @@ def mkBuiltinTokenTable : IO (IO.Ref TokenTable) := IO.mkRef {}
|
|||
def mkBuiltinSyntaxNodeKindSetRef : IO (IO.Ref SyntaxNodeKindSet) := IO.mkRef {}
|
||||
@[init mkBuiltinSyntaxNodeKindSetRef] constant builtinSyntaxNodeKindSetRef : IO.Ref SyntaxNodeKindSet := arbitrary _
|
||||
|
||||
def registerBuiltinNodeKindSet (k : SyntaxNodeKind) : IO Unit :=
|
||||
builtinSyntaxNodeKindSetRef.modify fun s => s.insert k
|
||||
|
||||
@[init] private def registerAuxiliaryNodeKindSets : IO Unit := do
|
||||
registerBuiltinNodeKindSet choiceKind;
|
||||
registerBuiltinNodeKindSet identKind;
|
||||
registerBuiltinNodeKindSet strLitKind;
|
||||
registerBuiltinNodeKindSet numLitKind;
|
||||
registerBuiltinNodeKindSet charLitKind;
|
||||
registerBuiltinNodeKindSet nameLitKind;
|
||||
pure ()
|
||||
|
||||
def mkBuiltinParserCategories : IO (IO.Ref ParserCategories) := IO.mkRef {}
|
||||
@[init mkBuiltinParserCategories] constant builtinParserCategoriesRef : IO.Ref ParserCategories := arbitrary _
|
||||
|
||||
|
|
@ -1887,7 +1899,7 @@ parserExtension.addEntry env $ ParserExtensionEntry.kind k
|
|||
|
||||
def isValidSyntaxNodeKind (env : Environment) (k : SyntaxNodeKind) : Bool :=
|
||||
let kinds := (parserExtension.getState env).kinds;
|
||||
kinds.contains k || k == choiceKind || k == identKind || isLitKind k
|
||||
kinds.contains k
|
||||
|
||||
def getSyntaxNodeKinds (env : Environment) : List SyntaxNodeKind := do
|
||||
let kinds := (parserExtension.getState env).kinds;
|
||||
|
|
|
|||
|
|
@ -210,7 +210,7 @@ catch p1 $ fun e => match e with
|
|||
-- Note that there is a mutual recursion
|
||||
-- `categoryParser -> mkAntiquot -> termParser -> categoryParser`, so we need to introduce an indirection somewhere
|
||||
-- anyway.
|
||||
--@[extern "lean_mk_antiquot_parenthesizer"]
|
||||
@[extern 7 "lean_mk_antiquot_parenthesizer"]
|
||||
constant mkAntiquot.parenthesizer' (name : String) (kind : Option SyntaxNodeKind) (anonymous := true) : Parenthesizer :=
|
||||
arbitrary _
|
||||
|
||||
|
|
@ -479,9 +479,12 @@ unsafe def mkParenthesizerOfConstantUnsafe (constName : Name) (compileParenthesi
|
|||
fun env => match env.find? constName with
|
||||
| none => throw $ IO.userError ("unknow constant '" ++ toString constName ++ "'")
|
||||
| some info =>
|
||||
if info.type.isConstOf `Lean.Parser.TrailingParser || info.type.isConstOf `Lean.Parser.Parser then do
|
||||
env ← compile env constName /- builtin -/ false;
|
||||
pure (parenthesizerForKind constName, env)
|
||||
if info.type.isConstOf `Lean.Parser.TrailingParser || info.type.isConstOf `Lean.Parser.Parser then
|
||||
match parenthesizerAttribute.getValues env constName with
|
||||
| p::_ => pure (p, env)
|
||||
| _ => do
|
||||
env ← compile env constName /- builtin -/ false;
|
||||
pure (parenthesizerForKind constName, env)
|
||||
else do
|
||||
d ← IO.ofExcept $ env.evalConst TrailingParserDescr constName;
|
||||
compileParenthesizerDescr d env
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@ lean_object* l_Quot_indep(lean_object*, lean_object*, lean_object*);
|
|||
lean_object* l_Function_comp(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Eq_ndrecOn___rarg(lean_object*);
|
||||
lean_object* l_bit1(lean_object*);
|
||||
lean_object* l_namedPattern(lean_object*, lean_object*);
|
||||
lean_object* l_dite_Decidable(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_dite_Decidable___rarg(uint8_t, lean_object*, lean_object*);
|
||||
lean_object* l_idDelta___rarg(lean_object*);
|
||||
|
|
@ -76,6 +77,7 @@ lean_object* l_Prod_sizeof(lean_object*, lean_object*);
|
|||
lean_object* l_arbitrary___rarg(lean_object*);
|
||||
lean_object* l_And_Decidable___rarg___boxed(lean_object*, lean_object*);
|
||||
lean_object* l_prodHasDecidableLt___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_namedPattern___rarg___boxed(lean_object*);
|
||||
uint8_t l_Ne_Decidable___rarg(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_std_priority_default;
|
||||
lean_object* l_Sigma_sizeof___at_Sigma_HasSizeof___spec__1(lean_object*, lean_object*);
|
||||
|
|
@ -122,6 +124,7 @@ uint8_t l_Not_Decidable___rarg(uint8_t);
|
|||
lean_object* l_Quotient_mk___boxed(lean_object*, lean_object*);
|
||||
lean_object* l_Forall_Inhabited(lean_object*, lean_object*);
|
||||
lean_object* l_List_sizeof___main___rarg(lean_object*, lean_object*);
|
||||
lean_object* l_namedPattern___rarg(lean_object*);
|
||||
uint8_t l_not(uint8_t);
|
||||
lean_object* l_Eq_mpr(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Quot_recOn___rarg(lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -205,6 +208,7 @@ lean_object* l_implies_Decidable___rarg___boxed(lean_object*, lean_object*);
|
|||
lean_object* l_Thunk_mk___boxed(lean_object*, lean_object*);
|
||||
lean_object* l_NonScalar_Inhabited;
|
||||
lean_object* l_ite___rarg___boxed(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_namedPattern___boxed(lean_object*, lean_object*);
|
||||
uint8_t l_or(uint8_t, uint8_t);
|
||||
lean_object* l_Nat_add___boxed(lean_object*, lean_object*);
|
||||
uint8_t l_Decidable_decide___rarg(uint8_t);
|
||||
|
|
@ -489,6 +493,39 @@ lean_dec(x_1);
|
|||
return x_2;
|
||||
}
|
||||
}
|
||||
lean_object* l_namedPattern___rarg(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
lean_inc(x_1);
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
lean_object* l_namedPattern(lean_object* x_1, lean_object* x_2) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_3;
|
||||
x_3 = lean_alloc_closure((void*)(l_namedPattern___rarg___boxed), 1, 0);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
lean_object* l_namedPattern___rarg___boxed(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_2;
|
||||
x_2 = l_namedPattern___rarg(x_1);
|
||||
lean_dec(x_1);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
lean_object* l_namedPattern___boxed(lean_object* x_1, lean_object* x_2) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_3;
|
||||
x_3 = l_namedPattern(x_1, x_2);
|
||||
lean_dec(x_2);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
lean_object* _init_l_Unit_unit() {
|
||||
_start:
|
||||
{
|
||||
|
|
|
|||
|
|
@ -15,9 +15,7 @@ extern "C" {
|
|||
#endif
|
||||
uint8_t l_String_isInt(lean_object*);
|
||||
lean_object* l_Int_HasNeg;
|
||||
lean_object* l_String_toInt_x3f___closed__1;
|
||||
lean_object* l_Int_natMod(lean_object*, lean_object*);
|
||||
uint8_t l_String_isInt___closed__1;
|
||||
lean_object* l_Int_repr___boxed(lean_object*);
|
||||
lean_object* l_String_toInt_x21___closed__1;
|
||||
lean_object* l_Int_HasOne;
|
||||
|
|
@ -29,11 +27,11 @@ lean_object* l_Int_sub___boxed(lean_object*, lean_object*);
|
|||
lean_object* l_Int_HasMod___closed__1;
|
||||
lean_object* l___private_Init_Util_1__mkPanicMessage(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
uint8_t l_Int_Int_DecidableEq(lean_object*, lean_object*);
|
||||
lean_object* l_Substring_nextn___main(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Int_negSucc___boxed(lean_object*);
|
||||
lean_object* l_String_toInt_x3f(lean_object*);
|
||||
lean_object* l_Int_HasRepr;
|
||||
lean_object* lean_string_append(lean_object*, lean_object*);
|
||||
lean_object* l_String_toInt_x3f___closed__2;
|
||||
lean_object* l_Int_HasZero;
|
||||
lean_object* l_Int_HasAdd;
|
||||
lean_object* lean_string_utf8_byte_size(lean_object*);
|
||||
|
|
@ -73,14 +71,12 @@ lean_object* l_Int_toNat(lean_object*);
|
|||
lean_object* lean_int_neg(lean_object*);
|
||||
lean_object* l_Int_one___closed__1;
|
||||
uint8_t l_UInt32_decEq(uint32_t, uint32_t);
|
||||
extern lean_object* l_Substring_drop___closed__2;
|
||||
lean_object* lean_int_neg_succ_of_nat(lean_object*);
|
||||
uint8_t lean_int_dec_le(lean_object*, lean_object*);
|
||||
lean_object* l_Int_one;
|
||||
lean_object* l_Int_HasCoe(lean_object*);
|
||||
lean_object* l_Int_negOfNat(lean_object*);
|
||||
lean_object* l_Int_HasMul;
|
||||
uint8_t lean_nat_dec_le(lean_object*, lean_object*);
|
||||
lean_object* l_Int_HasLess;
|
||||
lean_object* lean_panic_fn(lean_object*, lean_object*);
|
||||
lean_object* l_Int_subNatNat___boxed(lean_object*, lean_object*);
|
||||
|
|
@ -623,56 +619,6 @@ lean_dec(x_1);
|
|||
return x_3;
|
||||
}
|
||||
}
|
||||
lean_object* _init_l_String_toInt_x3f___closed__1() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2;
|
||||
x_1 = l_Substring_drop___closed__2;
|
||||
x_2 = l_Substring_toNat_x3f(x_1);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
lean_object* _init_l_String_toInt_x3f___closed__2() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = l_String_toInt_x3f___closed__1;
|
||||
if (lean_obj_tag(x_1) == 0)
|
||||
{
|
||||
lean_object* x_2;
|
||||
x_2 = lean_box(0);
|
||||
return x_2;
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_3;
|
||||
x_3 = !lean_is_exclusive(x_1);
|
||||
if (x_3 == 0)
|
||||
{
|
||||
lean_object* x_4; lean_object* x_5; lean_object* x_6;
|
||||
x_4 = lean_ctor_get(x_1, 0);
|
||||
x_5 = lean_nat_to_int(x_4);
|
||||
x_6 = lean_int_neg(x_5);
|
||||
lean_dec(x_5);
|
||||
lean_ctor_set(x_1, 0, x_6);
|
||||
return x_1;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10;
|
||||
x_7 = lean_ctor_get(x_1, 0);
|
||||
lean_inc(x_7);
|
||||
lean_dec(x_1);
|
||||
x_8 = lean_nat_to_int(x_7);
|
||||
x_9 = lean_int_neg(x_8);
|
||||
lean_dec(x_8);
|
||||
x_10 = lean_alloc_ctor(1, 1, 0);
|
||||
lean_ctor_set(x_10, 0, x_9);
|
||||
return x_10;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
lean_object* l_String_toInt_x3f(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
|
|
@ -719,72 +665,58 @@ return x_13;
|
|||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_14; lean_object* x_15; uint8_t x_16;
|
||||
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_14 = lean_string_utf8_byte_size(x_1);
|
||||
x_15 = lean_unsigned_to_nat(1u);
|
||||
x_16 = lean_nat_dec_le(x_14, x_15);
|
||||
if (x_16 == 0)
|
||||
lean_inc(x_14);
|
||||
lean_inc(x_1);
|
||||
x_15 = lean_alloc_ctor(0, 3, 0);
|
||||
lean_ctor_set(x_15, 0, x_1);
|
||||
lean_ctor_set(x_15, 1, x_2);
|
||||
lean_ctor_set(x_15, 2, x_14);
|
||||
x_16 = lean_unsigned_to_nat(1u);
|
||||
x_17 = l_Substring_nextn___main(x_15, x_16, x_2);
|
||||
lean_dec(x_15);
|
||||
x_18 = lean_alloc_ctor(0, 3, 0);
|
||||
lean_ctor_set(x_18, 0, x_1);
|
||||
lean_ctor_set(x_18, 1, x_17);
|
||||
lean_ctor_set(x_18, 2, x_14);
|
||||
x_19 = l_Substring_toNat_x3f(x_18);
|
||||
if (lean_obj_tag(x_19) == 0)
|
||||
{
|
||||
lean_object* x_17; lean_object* x_18;
|
||||
x_17 = lean_alloc_ctor(0, 3, 0);
|
||||
lean_ctor_set(x_17, 0, x_1);
|
||||
lean_ctor_set(x_17, 1, x_15);
|
||||
lean_ctor_set(x_17, 2, x_14);
|
||||
x_18 = l_Substring_toNat_x3f(x_17);
|
||||
if (lean_obj_tag(x_18) == 0)
|
||||
lean_object* x_20;
|
||||
x_20 = lean_box(0);
|
||||
return x_20;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_19;
|
||||
x_19 = lean_box(0);
|
||||
uint8_t x_21;
|
||||
x_21 = !lean_is_exclusive(x_19);
|
||||
if (x_21 == 0)
|
||||
{
|
||||
lean_object* x_22; lean_object* x_23; lean_object* x_24;
|
||||
x_22 = lean_ctor_get(x_19, 0);
|
||||
x_23 = lean_nat_to_int(x_22);
|
||||
x_24 = lean_int_neg(x_23);
|
||||
lean_dec(x_23);
|
||||
lean_ctor_set(x_19, 0, x_24);
|
||||
return x_19;
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_20;
|
||||
x_20 = !lean_is_exclusive(x_18);
|
||||
if (x_20 == 0)
|
||||
{
|
||||
lean_object* x_21; lean_object* x_22; lean_object* x_23;
|
||||
x_21 = lean_ctor_get(x_18, 0);
|
||||
x_22 = lean_nat_to_int(x_21);
|
||||
x_23 = lean_int_neg(x_22);
|
||||
lean_dec(x_22);
|
||||
lean_ctor_set(x_18, 0, x_23);
|
||||
return x_18;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27;
|
||||
x_24 = lean_ctor_get(x_18, 0);
|
||||
lean_inc(x_24);
|
||||
lean_dec(x_18);
|
||||
x_25 = lean_nat_to_int(x_24);
|
||||
x_26 = lean_int_neg(x_25);
|
||||
lean_dec(x_25);
|
||||
x_27 = lean_alloc_ctor(1, 1, 0);
|
||||
lean_ctor_set(x_27, 0, x_26);
|
||||
return x_27;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_28;
|
||||
lean_dec(x_14);
|
||||
lean_dec(x_1);
|
||||
x_28 = l_String_toInt_x3f___closed__2;
|
||||
lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28;
|
||||
x_25 = lean_ctor_get(x_19, 0);
|
||||
lean_inc(x_25);
|
||||
lean_dec(x_19);
|
||||
x_26 = lean_nat_to_int(x_25);
|
||||
x_27 = lean_int_neg(x_26);
|
||||
lean_dec(x_26);
|
||||
x_28 = lean_alloc_ctor(1, 1, 0);
|
||||
lean_ctor_set(x_28, 0, x_27);
|
||||
return x_28;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
uint8_t _init_l_String_isInt___closed__1() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; uint8_t x_2;
|
||||
x_1 = l_Substring_drop___closed__2;
|
||||
x_2 = l_Substring_isNat(x_1);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
uint8_t l_String_isInt(lean_object* x_1) {
|
||||
_start:
|
||||
|
|
@ -803,31 +735,26 @@ return x_6;
|
|||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_7; lean_object* x_8; uint8_t x_9;
|
||||
lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; uint8_t x_12;
|
||||
x_7 = lean_string_utf8_byte_size(x_1);
|
||||
x_8 = lean_unsigned_to_nat(1u);
|
||||
x_9 = lean_nat_dec_le(x_7, x_8);
|
||||
if (x_9 == 0)
|
||||
{
|
||||
lean_object* x_10; uint8_t x_11;
|
||||
x_10 = lean_alloc_ctor(0, 3, 0);
|
||||
lean_ctor_set(x_10, 0, x_1);
|
||||
lean_ctor_set(x_10, 1, x_8);
|
||||
lean_ctor_set(x_10, 2, x_7);
|
||||
x_11 = l_Substring_isNat(x_10);
|
||||
return x_11;
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_12;
|
||||
lean_dec(x_7);
|
||||
lean_dec(x_1);
|
||||
x_12 = l_String_isInt___closed__1;
|
||||
lean_inc(x_7);
|
||||
lean_inc(x_1);
|
||||
x_8 = lean_alloc_ctor(0, 3, 0);
|
||||
lean_ctor_set(x_8, 0, x_1);
|
||||
lean_ctor_set(x_8, 1, x_2);
|
||||
lean_ctor_set(x_8, 2, x_7);
|
||||
x_9 = lean_unsigned_to_nat(1u);
|
||||
x_10 = l_Substring_nextn___main(x_8, x_9, x_2);
|
||||
lean_dec(x_8);
|
||||
x_11 = lean_alloc_ctor(0, 3, 0);
|
||||
lean_ctor_set(x_11, 0, x_1);
|
||||
lean_ctor_set(x_11, 1, x_10);
|
||||
lean_ctor_set(x_11, 2, x_7);
|
||||
x_12 = l_Substring_isNat(x_11);
|
||||
return x_12;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
lean_object* l_String_isInt___boxed(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
|
|
@ -959,11 +886,6 @@ l_Int_HasMod___closed__1 = _init_l_Int_HasMod___closed__1();
|
|||
lean_mark_persistent(l_Int_HasMod___closed__1);
|
||||
l_Int_HasMod = _init_l_Int_HasMod();
|
||||
lean_mark_persistent(l_Int_HasMod);
|
||||
l_String_toInt_x3f___closed__1 = _init_l_String_toInt_x3f___closed__1();
|
||||
lean_mark_persistent(l_String_toInt_x3f___closed__1);
|
||||
l_String_toInt_x3f___closed__2 = _init_l_String_toInt_x3f___closed__2();
|
||||
lean_mark_persistent(l_String_toInt_x3f___closed__2);
|
||||
l_String_isInt___closed__1 = _init_l_String_isInt___closed__1();
|
||||
l_String_toInt_x21___closed__1 = _init_l_String_toInt_x21___closed__1();
|
||||
lean_mark_persistent(l_String_toInt_x21___closed__1);
|
||||
l_String_toInt_x21___closed__2 = _init_l_String_toInt_x21___closed__2();
|
||||
|
|
|
|||
|
|
@ -35,7 +35,6 @@ lean_object* l_Substring_extract___closed__1;
|
|||
lean_object* l_String_length___boxed(lean_object*);
|
||||
lean_object* l_String_Iterator_remainingBytes___boxed(lean_object*);
|
||||
lean_object* l_String_foldrAux___main___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_String_take___boxed(lean_object*, lean_object*);
|
||||
lean_object* l_Substring_extract___boxed(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Init_Data_String_Basic_4__utf8SetAux(uint32_t, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_String_trimRight___boxed(lean_object*);
|
||||
|
|
@ -47,7 +46,6 @@ lean_object* l_Substring_drop(lean_object*, lean_object*);
|
|||
lean_object* l_String_mk___boxed(lean_object*);
|
||||
lean_object* l_String_Iterator_extract___boxed(lean_object*, lean_object*);
|
||||
lean_object* l_Substring_toNat_x3f(lean_object*);
|
||||
lean_object* l_Substring_takeRight___boxed(lean_object*, lean_object*);
|
||||
lean_object* l_String_revPosOf(lean_object*, uint32_t);
|
||||
lean_object* l_Substring_toString___boxed(lean_object*);
|
||||
lean_object* l_Substring_takeWhileAux___main___at_String_nextUntil___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -71,6 +69,7 @@ lean_object* l_String_toSubstring(lean_object*);
|
|||
lean_object* l_Substring_extract(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_String_append___boxed(lean_object*, lean_object*);
|
||||
lean_object* l_String_Iterator_hasPrev___boxed(lean_object*);
|
||||
lean_object* l_Substring_nextn___main(lean_object*, lean_object*, lean_object*);
|
||||
uint8_t l_String_any(lean_object*, lean_object*);
|
||||
lean_object* l_String_foldl___rarg___boxed(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_String_foldlAux___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -91,7 +90,6 @@ lean_object* l_String_splitOn(lean_object*, lean_object*);
|
|||
lean_object* l_String_dropWhile(lean_object*, lean_object*);
|
||||
lean_object* lean_string_utf8_byte_size(lean_object*);
|
||||
lean_object* l_String_trimLeft___boxed(lean_object*);
|
||||
lean_object* l_String_dropRight___boxed(lean_object*, lean_object*);
|
||||
lean_object* l___private_Init_Data_String_Basic_7__utf8ExtractAux_u2081___main(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
uint8_t l_String_isPrefixOfAux(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_String_foldlAux___main___at_String_toNat_x3f___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -106,9 +104,9 @@ lean_object* l___private_Init_Data_String_Basic_5__utf8PrevAux___main(lean_objec
|
|||
lean_object* l_String_foldlAux___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_String_offsetOfPosAux___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_String_HasAppend;
|
||||
lean_object* l_Substring_prevn___main___boxed(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* lean_string_utf8_next(lean_object*, lean_object*);
|
||||
uint8_t l_Substring_all(lean_object*, lean_object*);
|
||||
lean_object* l_Substring_dropRight___boxed(lean_object*, lean_object*);
|
||||
lean_object* l_String_trimRight(lean_object*);
|
||||
lean_object* l_String_next___boxed(lean_object*, lean_object*);
|
||||
lean_object* l_String_isNat___boxed(lean_object*);
|
||||
|
|
@ -116,18 +114,18 @@ lean_object* l_String_offsetOfPosAux___main___boxed(lean_object*, lean_object*,
|
|||
lean_object* l_Substring_dropWhile(lean_object*, lean_object*);
|
||||
lean_object* l_Substring_all___boxed(lean_object*, lean_object*);
|
||||
lean_object* l_String_takeWhile(lean_object*, lean_object*);
|
||||
lean_object* l_String_drop___closed__1;
|
||||
uint8_t lean_nat_dec_eq(lean_object*, lean_object*);
|
||||
lean_object* l_Substring_next___boxed(lean_object*, lean_object*);
|
||||
lean_object* l_Substring_prevn(lean_object*, lean_object*, lean_object*);
|
||||
uint8_t l_String_contains(lean_object*, uint32_t);
|
||||
lean_object* l_Substring_next(lean_object*, lean_object*);
|
||||
lean_object* l___private_Init_Data_String_Basic_6__utf8ExtractAux_u2082___boxed(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_String_foldlAux___main___at_String_toNat_x3f___spec__1(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_String_atEnd___boxed(lean_object*, lean_object*);
|
||||
lean_object* l_String_Iterator_forward(lean_object*, lean_object*);
|
||||
lean_object* l_Substring_prevn___main(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* lean_nat_sub(lean_object*, lean_object*);
|
||||
lean_object* l_String_HasLess;
|
||||
lean_object* l_String_drop___boxed(lean_object*, lean_object*);
|
||||
lean_object* l___private_Init_Data_String_Basic_5__utf8PrevAux___main___boxed(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_String_foldl___rarg(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Init_Data_String_Basic_4__utf8SetAux___main(uint32_t, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -138,6 +136,7 @@ lean_object* l_String_take(lean_object*, lean_object*);
|
|||
uint8_t l_Substring_isNat(lean_object*);
|
||||
lean_object* l_Substring_foldr___rarg(lean_object*, lean_object*, lean_object*);
|
||||
uint8_t l_Substring_contains(lean_object*, uint32_t);
|
||||
lean_object* l_Substring_nextn___boxed(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Init_Data_String_Basic_7__utf8ExtractAux_u2081___main___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_String_Iterator_pos___boxed(lean_object*);
|
||||
lean_object* l___private_Init_Data_String_Basic_3__utf8GetAux___main___boxed(lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -161,7 +160,6 @@ uint8_t l_String_all(lean_object*, lean_object*);
|
|||
lean_object* l_Substring_foldl(lean_object*);
|
||||
uint32_t l_Substring_get(lean_object*, lean_object*);
|
||||
lean_object* l_Substring_any___boxed(lean_object*, lean_object*);
|
||||
lean_object* l_Substring_take___boxed(lean_object*, lean_object*);
|
||||
lean_object* l_String_takeRight(lean_object*, lean_object*);
|
||||
lean_object* l_Substring_toIterator(lean_object*);
|
||||
lean_object* l_Substring_splitOnAux(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -174,6 +172,7 @@ lean_object* l___private_Init_Data_String_Basic_4__utf8SetAux___boxed(lean_objec
|
|||
lean_object* l_String_front___boxed(lean_object*);
|
||||
lean_object* l_String_Iterator_remainingToString___boxed(lean_object*);
|
||||
lean_object* l_Substring_trimRight(lean_object*);
|
||||
lean_object* l_Substring_nextn___main___boxed(lean_object*, lean_object*, lean_object*);
|
||||
uint32_t lean_string_utf8_get(lean_object*, lean_object*);
|
||||
lean_object* l_String_splitOnAux(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Substring_takeRightWhileAux(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -185,6 +184,7 @@ lean_object* l_String_foldr___rarg(lean_object*, lean_object*, lean_object*);
|
|||
uint8_t l_Substring_beq(lean_object*, lean_object*);
|
||||
lean_object* l_String_anyAux___main___at_Substring_all___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_String_Iterator_next(lean_object*);
|
||||
lean_object* l_Substring_nextn(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_String_nextUntil___boxed(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Substring_front___boxed(lean_object*);
|
||||
lean_object* l_String_trimLeft(lean_object*);
|
||||
|
|
@ -198,7 +198,6 @@ lean_object* l_String_splitAux(lean_object*, lean_object*, lean_object*, lean_ob
|
|||
uint8_t l_String_Iterator_hasNext(lean_object*);
|
||||
lean_object* l_String_Iterator_nextn___main(lean_object*, lean_object*);
|
||||
lean_object* l_String_decEq___boxed(lean_object*, lean_object*);
|
||||
lean_object* l_String_takeRight___boxed(lean_object*, lean_object*);
|
||||
uint32_t l_String_front(lean_object*);
|
||||
lean_object* l_String_mapAux___main(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_String_dropWhile___boxed(lean_object*, lean_object*);
|
||||
|
|
@ -206,7 +205,6 @@ lean_object* l_String_anyAux___main___at_Substring_contains___spec__1___boxed(le
|
|||
lean_object* l_Substring_atEnd___boxed(lean_object*, lean_object*);
|
||||
lean_object* l_Substring_posOf___boxed(lean_object*, lean_object*);
|
||||
lean_object* l_Substring_takeWhileAux___main___at_String_nextUntil___spec__1(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Substring_drop___closed__1;
|
||||
lean_object* l_String_nextWhile(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_String_Iterator_hasNext___boxed(lean_object*);
|
||||
lean_object* l_String_Iterator_prevn___main(lean_object*, lean_object*);
|
||||
|
|
@ -216,9 +214,7 @@ uint8_t l_UInt32_decEq(uint32_t, uint32_t);
|
|||
lean_object* l_String_intercalate(lean_object*, lean_object*);
|
||||
lean_object* l_String_posOfAux(lean_object*, uint32_t, lean_object*, lean_object*);
|
||||
lean_object* l_String_splitAux___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Substring_drop___closed__2;
|
||||
uint8_t l_String_isEmpty(lean_object*);
|
||||
lean_object* l_Substring_drop___boxed(lean_object*, lean_object*);
|
||||
uint32_t l___private_Init_Data_String_Basic_3__utf8GetAux(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_String_foldrAux(lean_object*);
|
||||
uint8_t l_String_DecidableEq(lean_object*, lean_object*);
|
||||
|
|
@ -309,6 +305,7 @@ lean_object* l_String_revPosOfAux___main(lean_object*, uint32_t, lean_object*);
|
|||
lean_object* l_Substring_prev___boxed(lean_object*, lean_object*);
|
||||
lean_object* l_Substring_get___boxed(lean_object*, lean_object*);
|
||||
lean_object* l_String_posOf(lean_object*, uint32_t);
|
||||
lean_object* l_Substring_splitOnAux___main___closed__1;
|
||||
lean_object* l_Substring_dropRightWhile(lean_object*, lean_object*);
|
||||
uint8_t lean_string_utf8_at_end(lean_object*, lean_object*);
|
||||
lean_object* l_String_modify___boxed(lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -317,10 +314,12 @@ lean_object* lean_uint32_to_nat(uint32_t);
|
|||
lean_object* l_Substring_contains___boxed(lean_object*, lean_object*);
|
||||
lean_object* l_List_foldl___main___at_String_join___spec__1(lean_object*, lean_object*);
|
||||
lean_object* lean_string_mk(lean_object*);
|
||||
lean_object* l_Substring_splitOnAux___main___closed__2;
|
||||
lean_object* l___private_Init_Data_String_Basic_1__csize(uint32_t);
|
||||
lean_object* l_Substring_prev(lean_object*, lean_object*);
|
||||
lean_object* l_String_foldlAux___main___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_String_offsetOfPos(lean_object*, lean_object*);
|
||||
lean_object* l_Substring_prevn___boxed(lean_object*, lean_object*, lean_object*);
|
||||
uint8_t lean_string_dec_lt(lean_object*, lean_object*);
|
||||
uint8_t lean_string_dec_eq(lean_object*, lean_object*);
|
||||
lean_object* l_String_HasSizeof;
|
||||
|
|
@ -3223,6 +3222,145 @@ lean_dec(x_1);
|
|||
return x_3;
|
||||
}
|
||||
}
|
||||
lean_object* l_Substring_nextn___main(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_4; uint8_t x_5;
|
||||
x_4 = lean_unsigned_to_nat(0u);
|
||||
x_5 = lean_nat_dec_eq(x_2, x_4);
|
||||
if (x_5 == 0)
|
||||
{
|
||||
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; uint8_t x_13;
|
||||
x_6 = lean_unsigned_to_nat(1u);
|
||||
x_7 = lean_nat_sub(x_2, x_6);
|
||||
lean_dec(x_2);
|
||||
x_8 = lean_ctor_get(x_1, 0);
|
||||
x_9 = lean_ctor_get(x_1, 1);
|
||||
x_10 = lean_ctor_get(x_1, 2);
|
||||
x_11 = lean_nat_add(x_9, x_3);
|
||||
lean_dec(x_3);
|
||||
x_12 = lean_string_utf8_next(x_8, x_11);
|
||||
lean_dec(x_11);
|
||||
x_13 = lean_nat_dec_lt(x_10, x_12);
|
||||
if (x_13 == 0)
|
||||
{
|
||||
lean_object* x_14;
|
||||
x_14 = lean_nat_sub(x_12, x_9);
|
||||
lean_dec(x_12);
|
||||
x_2 = x_7;
|
||||
x_3 = x_14;
|
||||
goto _start;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_16;
|
||||
lean_dec(x_12);
|
||||
x_16 = lean_nat_sub(x_10, x_9);
|
||||
x_2 = x_7;
|
||||
x_3 = x_16;
|
||||
goto _start;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_dec(x_2);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
}
|
||||
lean_object* l_Substring_nextn___main___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_4;
|
||||
x_4 = l_Substring_nextn___main(x_1, x_2, x_3);
|
||||
lean_dec(x_1);
|
||||
return x_4;
|
||||
}
|
||||
}
|
||||
lean_object* l_Substring_nextn(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_4;
|
||||
x_4 = l_Substring_nextn___main(x_1, x_2, x_3);
|
||||
return x_4;
|
||||
}
|
||||
}
|
||||
lean_object* l_Substring_nextn___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_4;
|
||||
x_4 = l_Substring_nextn(x_1, x_2, x_3);
|
||||
lean_dec(x_1);
|
||||
return x_4;
|
||||
}
|
||||
}
|
||||
lean_object* l_Substring_prevn___main(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_4; uint8_t x_5;
|
||||
x_4 = lean_unsigned_to_nat(0u);
|
||||
x_5 = lean_nat_dec_eq(x_2, x_4);
|
||||
if (x_5 == 0)
|
||||
{
|
||||
lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; uint8_t x_10;
|
||||
x_6 = lean_unsigned_to_nat(1u);
|
||||
x_7 = lean_nat_sub(x_2, x_6);
|
||||
lean_dec(x_2);
|
||||
x_8 = lean_ctor_get(x_1, 0);
|
||||
x_9 = lean_ctor_get(x_1, 1);
|
||||
x_10 = lean_nat_dec_eq(x_3, x_9);
|
||||
if (x_10 == 0)
|
||||
{
|
||||
lean_object* x_11; lean_object* x_12; lean_object* x_13;
|
||||
x_11 = lean_nat_add(x_9, x_3);
|
||||
lean_dec(x_3);
|
||||
x_12 = lean_string_utf8_prev(x_8, x_11);
|
||||
lean_dec(x_11);
|
||||
x_13 = lean_nat_sub(x_12, x_9);
|
||||
lean_dec(x_12);
|
||||
x_2 = x_7;
|
||||
x_3 = x_13;
|
||||
goto _start;
|
||||
}
|
||||
else
|
||||
{
|
||||
x_2 = x_7;
|
||||
goto _start;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_dec(x_2);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
}
|
||||
lean_object* l_Substring_prevn___main___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_4;
|
||||
x_4 = l_Substring_prevn___main(x_1, x_2, x_3);
|
||||
lean_dec(x_1);
|
||||
return x_4;
|
||||
}
|
||||
}
|
||||
lean_object* l_Substring_prevn(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_4;
|
||||
x_4 = l_Substring_prevn___main(x_1, x_2, x_3);
|
||||
return x_4;
|
||||
}
|
||||
}
|
||||
lean_object* l_Substring_prevn___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_4;
|
||||
x_4 = l_Substring_prevn(x_1, x_2, x_3);
|
||||
lean_dec(x_1);
|
||||
return x_4;
|
||||
}
|
||||
}
|
||||
uint32_t l_Substring_front(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
|
|
@ -3277,309 +3415,146 @@ x_4 = l_Substring_posOf(x_1, x_3);
|
|||
return x_4;
|
||||
}
|
||||
}
|
||||
lean_object* _init_l_Substring_drop___closed__1() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2;
|
||||
x_1 = l_String_splitAux___main___closed__1;
|
||||
x_2 = lean_string_utf8_byte_size(x_1);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
lean_object* _init_l_Substring_drop___closed__2() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4;
|
||||
x_1 = l_String_splitAux___main___closed__1;
|
||||
x_2 = lean_unsigned_to_nat(0u);
|
||||
x_3 = l_Substring_drop___closed__1;
|
||||
x_4 = lean_alloc_ctor(0, 3, 0);
|
||||
lean_ctor_set(x_4, 0, x_1);
|
||||
lean_ctor_set(x_4, 1, x_2);
|
||||
lean_ctor_set(x_4, 2, x_3);
|
||||
return x_4;
|
||||
}
|
||||
}
|
||||
lean_object* l_Substring_drop(lean_object* x_1, lean_object* x_2) {
|
||||
_start:
|
||||
{
|
||||
uint8_t x_3;
|
||||
x_3 = !lean_is_exclusive(x_1);
|
||||
if (x_3 == 0)
|
||||
{
|
||||
lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; uint8_t x_8;
|
||||
x_4 = lean_ctor_get(x_1, 0);
|
||||
x_5 = lean_ctor_get(x_1, 1);
|
||||
x_6 = lean_ctor_get(x_1, 2);
|
||||
x_7 = lean_nat_add(x_5, x_2);
|
||||
lean_dec(x_5);
|
||||
x_8 = lean_nat_dec_le(x_6, x_7);
|
||||
if (x_8 == 0)
|
||||
{
|
||||
lean_ctor_set(x_1, 1, x_7);
|
||||
return x_1;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_9;
|
||||
lean_dec(x_7);
|
||||
lean_free_object(x_1);
|
||||
lean_dec(x_6);
|
||||
lean_dec(x_4);
|
||||
x_9 = l_Substring_drop___closed__2;
|
||||
return x_9;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; uint8_t x_14;
|
||||
x_10 = lean_ctor_get(x_1, 0);
|
||||
x_11 = lean_ctor_get(x_1, 1);
|
||||
x_12 = lean_ctor_get(x_1, 2);
|
||||
lean_inc(x_12);
|
||||
lean_inc(x_11);
|
||||
lean_inc(x_10);
|
||||
lean_dec(x_1);
|
||||
x_13 = lean_nat_add(x_11, x_2);
|
||||
lean_dec(x_11);
|
||||
x_14 = lean_nat_dec_le(x_12, x_13);
|
||||
if (x_14 == 0)
|
||||
{
|
||||
lean_object* x_15;
|
||||
x_15 = lean_alloc_ctor(0, 3, 0);
|
||||
lean_ctor_set(x_15, 0, x_10);
|
||||
lean_ctor_set(x_15, 1, x_13);
|
||||
lean_ctor_set(x_15, 2, x_12);
|
||||
return x_15;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_16;
|
||||
lean_dec(x_13);
|
||||
lean_dec(x_12);
|
||||
lean_dec(x_10);
|
||||
x_16 = l_Substring_drop___closed__2;
|
||||
return x_16;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
lean_object* l_Substring_drop___boxed(lean_object* x_1, lean_object* x_2) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_3;
|
||||
x_3 = l_Substring_drop(x_1, x_2);
|
||||
lean_dec(x_2);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
lean_object* l_Substring_dropRight(lean_object* x_1, lean_object* x_2) {
|
||||
_start:
|
||||
{
|
||||
uint8_t x_3;
|
||||
x_3 = !lean_is_exclusive(x_1);
|
||||
if (x_3 == 0)
|
||||
{
|
||||
lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; uint8_t x_8;
|
||||
x_4 = lean_ctor_get(x_1, 0);
|
||||
x_5 = lean_ctor_get(x_1, 1);
|
||||
x_6 = lean_ctor_get(x_1, 2);
|
||||
x_7 = lean_nat_sub(x_6, x_2);
|
||||
lean_dec(x_6);
|
||||
x_8 = lean_nat_dec_le(x_7, x_5);
|
||||
if (x_8 == 0)
|
||||
{
|
||||
lean_ctor_set(x_1, 2, x_7);
|
||||
return x_1;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_9;
|
||||
lean_dec(x_7);
|
||||
lean_free_object(x_1);
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_4);
|
||||
x_9 = l_Substring_drop___closed__2;
|
||||
return x_9;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; uint8_t x_14;
|
||||
x_10 = lean_ctor_get(x_1, 0);
|
||||
x_11 = lean_ctor_get(x_1, 1);
|
||||
x_12 = lean_ctor_get(x_1, 2);
|
||||
lean_inc(x_12);
|
||||
lean_inc(x_11);
|
||||
lean_inc(x_10);
|
||||
lean_dec(x_1);
|
||||
x_13 = lean_nat_sub(x_12, x_2);
|
||||
lean_dec(x_12);
|
||||
x_14 = lean_nat_dec_le(x_13, x_11);
|
||||
if (x_14 == 0)
|
||||
{
|
||||
lean_object* x_15;
|
||||
x_15 = lean_alloc_ctor(0, 3, 0);
|
||||
lean_ctor_set(x_15, 0, x_10);
|
||||
lean_ctor_set(x_15, 1, x_11);
|
||||
lean_ctor_set(x_15, 2, x_13);
|
||||
return x_15;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_16;
|
||||
lean_dec(x_13);
|
||||
lean_dec(x_11);
|
||||
lean_dec(x_10);
|
||||
x_16 = l_Substring_drop___closed__2;
|
||||
return x_16;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
lean_object* l_Substring_dropRight___boxed(lean_object* x_1, lean_object* x_2) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_3;
|
||||
x_3 = l_Substring_dropRight(x_1, x_2);
|
||||
lean_dec(x_2);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
lean_object* l_Substring_take(lean_object* x_1, lean_object* x_2) {
|
||||
_start:
|
||||
{
|
||||
uint8_t x_3;
|
||||
x_3 = !lean_is_exclusive(x_1);
|
||||
if (x_3 == 0)
|
||||
{
|
||||
lean_object* x_4; lean_object* x_5; lean_object* x_6; uint8_t x_7;
|
||||
lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; uint8_t x_7;
|
||||
x_3 = lean_ctor_get(x_1, 0);
|
||||
lean_inc(x_3);
|
||||
x_4 = lean_ctor_get(x_1, 1);
|
||||
lean_inc(x_4);
|
||||
x_5 = lean_ctor_get(x_1, 2);
|
||||
x_6 = lean_nat_add(x_4, x_2);
|
||||
x_7 = lean_nat_dec_le(x_5, x_6);
|
||||
lean_inc(x_5);
|
||||
x_6 = l_Substring_nextn___main(x_1, x_2, x_4);
|
||||
x_7 = !lean_is_exclusive(x_1);
|
||||
if (x_7 == 0)
|
||||
{
|
||||
lean_dec(x_5);
|
||||
lean_ctor_set(x_1, 2, x_6);
|
||||
return x_1;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_dec(x_6);
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; uint8_t x_12;
|
||||
x_8 = lean_ctor_get(x_1, 0);
|
||||
lean_object* x_8; lean_object* x_9; lean_object* x_10;
|
||||
x_8 = lean_ctor_get(x_1, 2);
|
||||
lean_dec(x_8);
|
||||
x_9 = lean_ctor_get(x_1, 1);
|
||||
x_10 = lean_ctor_get(x_1, 2);
|
||||
lean_inc(x_10);
|
||||
lean_inc(x_9);
|
||||
lean_inc(x_8);
|
||||
lean_dec(x_1);
|
||||
x_11 = lean_nat_add(x_9, x_2);
|
||||
x_12 = lean_nat_dec_le(x_10, x_11);
|
||||
if (x_12 == 0)
|
||||
{
|
||||
lean_object* x_13;
|
||||
lean_dec(x_9);
|
||||
x_10 = lean_ctor_get(x_1, 0);
|
||||
lean_dec(x_10);
|
||||
x_13 = lean_alloc_ctor(0, 3, 0);
|
||||
lean_ctor_set(x_13, 0, x_8);
|
||||
lean_ctor_set(x_13, 1, x_9);
|
||||
lean_ctor_set(x_13, 2, x_11);
|
||||
return x_13;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_14;
|
||||
lean_dec(x_11);
|
||||
x_14 = lean_alloc_ctor(0, 3, 0);
|
||||
lean_ctor_set(x_14, 0, x_8);
|
||||
lean_ctor_set(x_14, 1, x_9);
|
||||
lean_ctor_set(x_14, 2, x_10);
|
||||
return x_14;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
lean_object* l_Substring_take___boxed(lean_object* x_1, lean_object* x_2) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_3;
|
||||
x_3 = l_Substring_take(x_1, x_2);
|
||||
lean_dec(x_2);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
lean_object* l_Substring_takeRight(lean_object* x_1, lean_object* x_2) {
|
||||
_start:
|
||||
{
|
||||
uint8_t x_3;
|
||||
x_3 = !lean_is_exclusive(x_1);
|
||||
if (x_3 == 0)
|
||||
{
|
||||
lean_object* x_4; lean_object* x_5; lean_object* x_6; uint8_t x_7;
|
||||
x_4 = lean_ctor_get(x_1, 1);
|
||||
x_5 = lean_ctor_get(x_1, 2);
|
||||
x_6 = lean_nat_sub(x_5, x_2);
|
||||
x_7 = lean_nat_dec_le(x_6, x_4);
|
||||
if (x_7 == 0)
|
||||
{
|
||||
lean_dec(x_4);
|
||||
lean_ctor_set(x_1, 1, x_6);
|
||||
return x_1;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_dec(x_6);
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; uint8_t x_12;
|
||||
x_8 = lean_ctor_get(x_1, 0);
|
||||
x_9 = lean_ctor_get(x_1, 1);
|
||||
x_10 = lean_ctor_get(x_1, 2);
|
||||
lean_inc(x_10);
|
||||
lean_inc(x_9);
|
||||
lean_inc(x_8);
|
||||
lean_object* x_11;
|
||||
lean_dec(x_1);
|
||||
x_11 = lean_nat_sub(x_10, x_2);
|
||||
x_12 = lean_nat_dec_le(x_11, x_9);
|
||||
if (x_12 == 0)
|
||||
{
|
||||
lean_object* x_13;
|
||||
lean_dec(x_9);
|
||||
x_13 = lean_alloc_ctor(0, 3, 0);
|
||||
lean_ctor_set(x_13, 0, x_8);
|
||||
lean_ctor_set(x_13, 1, x_11);
|
||||
lean_ctor_set(x_13, 2, x_10);
|
||||
return x_13;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_14;
|
||||
lean_dec(x_11);
|
||||
x_14 = lean_alloc_ctor(0, 3, 0);
|
||||
lean_ctor_set(x_14, 0, x_8);
|
||||
lean_ctor_set(x_14, 1, x_9);
|
||||
lean_ctor_set(x_14, 2, x_10);
|
||||
return x_14;
|
||||
x_11 = lean_alloc_ctor(0, 3, 0);
|
||||
lean_ctor_set(x_11, 0, x_3);
|
||||
lean_ctor_set(x_11, 1, x_6);
|
||||
lean_ctor_set(x_11, 2, x_5);
|
||||
return x_11;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
lean_object* l_Substring_takeRight___boxed(lean_object* x_1, lean_object* x_2) {
|
||||
lean_object* l_Substring_dropRight(lean_object* x_1, lean_object* x_2) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_3;
|
||||
x_3 = l_Substring_takeRight(x_1, x_2);
|
||||
lean_dec(x_2);
|
||||
return x_3;
|
||||
lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; uint8_t x_7;
|
||||
x_3 = lean_ctor_get(x_1, 0);
|
||||
lean_inc(x_3);
|
||||
x_4 = lean_ctor_get(x_1, 1);
|
||||
lean_inc(x_4);
|
||||
x_5 = lean_ctor_get(x_1, 2);
|
||||
lean_inc(x_5);
|
||||
x_6 = l_Substring_prevn___main(x_1, x_2, x_5);
|
||||
x_7 = !lean_is_exclusive(x_1);
|
||||
if (x_7 == 0)
|
||||
{
|
||||
lean_object* x_8; lean_object* x_9; lean_object* x_10;
|
||||
x_8 = lean_ctor_get(x_1, 2);
|
||||
lean_dec(x_8);
|
||||
x_9 = lean_ctor_get(x_1, 1);
|
||||
lean_dec(x_9);
|
||||
x_10 = lean_ctor_get(x_1, 0);
|
||||
lean_dec(x_10);
|
||||
lean_ctor_set(x_1, 2, x_6);
|
||||
return x_1;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_11;
|
||||
lean_dec(x_1);
|
||||
x_11 = lean_alloc_ctor(0, 3, 0);
|
||||
lean_ctor_set(x_11, 0, x_3);
|
||||
lean_ctor_set(x_11, 1, x_4);
|
||||
lean_ctor_set(x_11, 2, x_6);
|
||||
return x_11;
|
||||
}
|
||||
}
|
||||
}
|
||||
lean_object* l_Substring_take(lean_object* x_1, lean_object* x_2) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_3; lean_object* x_4; lean_object* x_5; uint8_t x_6;
|
||||
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_inc(x_4);
|
||||
x_5 = l_Substring_nextn___main(x_1, x_2, x_4);
|
||||
x_6 = !lean_is_exclusive(x_1);
|
||||
if (x_6 == 0)
|
||||
{
|
||||
lean_object* x_7; lean_object* x_8; lean_object* x_9;
|
||||
x_7 = lean_ctor_get(x_1, 2);
|
||||
lean_dec(x_7);
|
||||
x_8 = lean_ctor_get(x_1, 1);
|
||||
lean_dec(x_8);
|
||||
x_9 = lean_ctor_get(x_1, 0);
|
||||
lean_dec(x_9);
|
||||
lean_ctor_set(x_1, 2, x_5);
|
||||
return x_1;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_10;
|
||||
lean_dec(x_1);
|
||||
x_10 = lean_alloc_ctor(0, 3, 0);
|
||||
lean_ctor_set(x_10, 0, x_3);
|
||||
lean_ctor_set(x_10, 1, x_4);
|
||||
lean_ctor_set(x_10, 2, x_5);
|
||||
return x_10;
|
||||
}
|
||||
}
|
||||
}
|
||||
lean_object* l_Substring_takeRight(lean_object* x_1, lean_object* x_2) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_3; lean_object* x_4; lean_object* x_5; uint8_t x_6;
|
||||
x_3 = lean_ctor_get(x_1, 0);
|
||||
lean_inc(x_3);
|
||||
x_4 = lean_ctor_get(x_1, 2);
|
||||
lean_inc(x_4);
|
||||
lean_inc(x_4);
|
||||
x_5 = l_Substring_prevn___main(x_1, x_2, x_4);
|
||||
x_6 = !lean_is_exclusive(x_1);
|
||||
if (x_6 == 0)
|
||||
{
|
||||
lean_object* x_7; lean_object* x_8; lean_object* x_9;
|
||||
x_7 = lean_ctor_get(x_1, 2);
|
||||
lean_dec(x_7);
|
||||
x_8 = lean_ctor_get(x_1, 1);
|
||||
lean_dec(x_8);
|
||||
x_9 = lean_ctor_get(x_1, 0);
|
||||
lean_dec(x_9);
|
||||
lean_ctor_set(x_1, 1, x_5);
|
||||
return x_1;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_10;
|
||||
lean_dec(x_1);
|
||||
x_10 = lean_alloc_ctor(0, 3, 0);
|
||||
lean_ctor_set(x_10, 0, x_3);
|
||||
lean_ctor_set(x_10, 1, x_5);
|
||||
lean_ctor_set(x_10, 2, x_4);
|
||||
return x_10;
|
||||
}
|
||||
}
|
||||
}
|
||||
uint8_t l_Substring_atEnd(lean_object* x_1, lean_object* x_2) {
|
||||
|
|
@ -3694,6 +3669,29 @@ lean_dec(x_2);
|
|||
return x_4;
|
||||
}
|
||||
}
|
||||
lean_object* _init_l_Substring_splitOnAux___main___closed__1() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2;
|
||||
x_1 = l_String_splitAux___main___closed__1;
|
||||
x_2 = lean_string_utf8_byte_size(x_1);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
lean_object* _init_l_Substring_splitOnAux___main___closed__2() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4;
|
||||
x_1 = l_String_splitAux___main___closed__1;
|
||||
x_2 = lean_unsigned_to_nat(0u);
|
||||
x_3 = l_Substring_splitOnAux___main___closed__1;
|
||||
x_4 = lean_alloc_ctor(0, 3, 0);
|
||||
lean_ctor_set(x_4, 0, x_1);
|
||||
lean_ctor_set(x_4, 1, x_2);
|
||||
lean_ctor_set(x_4, 2, x_3);
|
||||
return x_4;
|
||||
}
|
||||
}
|
||||
lean_object* l_Substring_splitOnAux___main(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:
|
||||
{
|
||||
|
|
@ -3784,7 +3782,7 @@ lean_ctor_set(x_29, 2, x_28);
|
|||
x_30 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_30, 0, x_29);
|
||||
lean_ctor_set(x_30, 1, x_7);
|
||||
x_31 = l_Substring_drop___closed__2;
|
||||
x_31 = l_Substring_splitOnAux___main___closed__2;
|
||||
x_32 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_32, 0, x_31);
|
||||
lean_ctor_set(x_32, 1, x_30);
|
||||
|
|
@ -4678,158 +4676,86 @@ x_1 = l_Substring_hasBeq___closed__1;
|
|||
return x_1;
|
||||
}
|
||||
}
|
||||
lean_object* _init_l_String_drop___closed__1() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4;
|
||||
x_1 = l_String_splitAux___main___closed__1;
|
||||
x_2 = lean_unsigned_to_nat(0u);
|
||||
x_3 = l_Substring_drop___closed__1;
|
||||
x_4 = lean_string_utf8_extract(x_1, x_2, x_3);
|
||||
return x_4;
|
||||
}
|
||||
}
|
||||
lean_object* l_String_drop(lean_object* x_1, lean_object* x_2) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_3; lean_object* x_4; lean_object* x_5; uint8_t x_6;
|
||||
lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7;
|
||||
x_3 = lean_string_utf8_byte_size(x_1);
|
||||
x_4 = lean_unsigned_to_nat(0u);
|
||||
x_5 = lean_nat_add(x_4, x_2);
|
||||
x_6 = lean_nat_dec_le(x_3, x_5);
|
||||
if (x_6 == 0)
|
||||
{
|
||||
lean_object* x_7;
|
||||
x_7 = lean_string_utf8_extract(x_1, x_5, x_3);
|
||||
lean_dec(x_3);
|
||||
lean_dec(x_5);
|
||||
return x_7;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_8;
|
||||
lean_inc(x_3);
|
||||
lean_inc(x_1);
|
||||
x_5 = lean_alloc_ctor(0, 3, 0);
|
||||
lean_ctor_set(x_5, 0, x_1);
|
||||
lean_ctor_set(x_5, 1, x_4);
|
||||
lean_ctor_set(x_5, 2, x_3);
|
||||
x_6 = l_Substring_nextn___main(x_5, x_2, x_4);
|
||||
lean_dec(x_5);
|
||||
x_7 = lean_string_utf8_extract(x_1, x_6, x_3);
|
||||
lean_dec(x_3);
|
||||
x_8 = l_String_drop___closed__1;
|
||||
return x_8;
|
||||
}
|
||||
}
|
||||
}
|
||||
lean_object* l_String_drop___boxed(lean_object* x_1, lean_object* x_2) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_3;
|
||||
x_3 = l_String_drop(x_1, x_2);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_6);
|
||||
lean_dec(x_1);
|
||||
return x_3;
|
||||
return x_7;
|
||||
}
|
||||
}
|
||||
lean_object* l_String_dropRight(lean_object* x_1, lean_object* x_2) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_3; lean_object* x_4; lean_object* x_5; uint8_t x_6;
|
||||
lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7;
|
||||
x_3 = lean_string_utf8_byte_size(x_1);
|
||||
x_4 = lean_nat_sub(x_3, x_2);
|
||||
lean_dec(x_3);
|
||||
x_5 = lean_unsigned_to_nat(0u);
|
||||
x_6 = lean_nat_dec_le(x_4, x_5);
|
||||
if (x_6 == 0)
|
||||
{
|
||||
lean_object* x_7;
|
||||
x_7 = lean_string_utf8_extract(x_1, x_5, x_4);
|
||||
lean_dec(x_4);
|
||||
return x_7;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_8;
|
||||
lean_dec(x_4);
|
||||
x_8 = l_String_drop___closed__1;
|
||||
return x_8;
|
||||
}
|
||||
}
|
||||
}
|
||||
lean_object* l_String_dropRight___boxed(lean_object* x_1, lean_object* x_2) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_3;
|
||||
x_3 = l_String_dropRight(x_1, x_2);
|
||||
lean_dec(x_2);
|
||||
x_4 = lean_unsigned_to_nat(0u);
|
||||
lean_inc(x_3);
|
||||
lean_inc(x_1);
|
||||
x_5 = lean_alloc_ctor(0, 3, 0);
|
||||
lean_ctor_set(x_5, 0, x_1);
|
||||
lean_ctor_set(x_5, 1, x_4);
|
||||
lean_ctor_set(x_5, 2, x_3);
|
||||
x_6 = l_Substring_prevn___main(x_5, x_2, x_3);
|
||||
lean_dec(x_5);
|
||||
x_7 = lean_string_utf8_extract(x_1, x_4, x_6);
|
||||
lean_dec(x_6);
|
||||
lean_dec(x_1);
|
||||
return x_3;
|
||||
return x_7;
|
||||
}
|
||||
}
|
||||
lean_object* l_String_take(lean_object* x_1, lean_object* x_2) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_3; lean_object* x_4; lean_object* x_5; uint8_t x_6;
|
||||
lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7;
|
||||
x_3 = lean_string_utf8_byte_size(x_1);
|
||||
x_4 = lean_unsigned_to_nat(0u);
|
||||
x_5 = lean_nat_add(x_4, x_2);
|
||||
x_6 = lean_nat_dec_le(x_3, x_5);
|
||||
if (x_6 == 0)
|
||||
{
|
||||
lean_object* x_7;
|
||||
lean_dec(x_3);
|
||||
x_7 = lean_string_utf8_extract(x_1, x_4, x_5);
|
||||
lean_inc(x_1);
|
||||
x_5 = lean_alloc_ctor(0, 3, 0);
|
||||
lean_ctor_set(x_5, 0, x_1);
|
||||
lean_ctor_set(x_5, 1, x_4);
|
||||
lean_ctor_set(x_5, 2, x_3);
|
||||
x_6 = l_Substring_nextn___main(x_5, x_2, x_4);
|
||||
lean_dec(x_5);
|
||||
return x_7;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_8;
|
||||
lean_dec(x_5);
|
||||
x_8 = lean_string_utf8_extract(x_1, x_4, x_3);
|
||||
lean_dec(x_3);
|
||||
return x_8;
|
||||
}
|
||||
}
|
||||
}
|
||||
lean_object* l_String_take___boxed(lean_object* x_1, lean_object* x_2) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_3;
|
||||
x_3 = l_String_take(x_1, x_2);
|
||||
lean_dec(x_2);
|
||||
x_7 = lean_string_utf8_extract(x_1, x_4, x_6);
|
||||
lean_dec(x_6);
|
||||
lean_dec(x_1);
|
||||
return x_3;
|
||||
return x_7;
|
||||
}
|
||||
}
|
||||
lean_object* l_String_takeRight(lean_object* x_1, lean_object* x_2) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_3; lean_object* x_4; lean_object* x_5; uint8_t x_6;
|
||||
lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7;
|
||||
x_3 = lean_string_utf8_byte_size(x_1);
|
||||
x_4 = lean_nat_sub(x_3, x_2);
|
||||
x_5 = lean_unsigned_to_nat(0u);
|
||||
x_6 = lean_nat_dec_le(x_4, x_5);
|
||||
if (x_6 == 0)
|
||||
{
|
||||
lean_object* x_7;
|
||||
x_7 = lean_string_utf8_extract(x_1, x_4, x_3);
|
||||
x_4 = lean_unsigned_to_nat(0u);
|
||||
lean_inc(x_3);
|
||||
lean_inc(x_1);
|
||||
x_5 = lean_alloc_ctor(0, 3, 0);
|
||||
lean_ctor_set(x_5, 0, x_1);
|
||||
lean_ctor_set(x_5, 1, x_4);
|
||||
lean_ctor_set(x_5, 2, x_3);
|
||||
lean_inc(x_3);
|
||||
x_6 = l_Substring_prevn___main(x_5, x_2, x_3);
|
||||
lean_dec(x_5);
|
||||
x_7 = lean_string_utf8_extract(x_1, x_6, x_3);
|
||||
lean_dec(x_3);
|
||||
lean_dec(x_4);
|
||||
return x_7;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_8;
|
||||
lean_dec(x_4);
|
||||
x_8 = lean_string_utf8_extract(x_1, x_5, x_3);
|
||||
lean_dec(x_3);
|
||||
return x_8;
|
||||
}
|
||||
}
|
||||
}
|
||||
lean_object* l_String_takeRight___boxed(lean_object* x_1, lean_object* x_2) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_3;
|
||||
x_3 = l_String_takeRight(x_1, x_2);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_6);
|
||||
lean_dec(x_1);
|
||||
return x_3;
|
||||
return x_7;
|
||||
}
|
||||
}
|
||||
lean_object* l_String_takeWhile(lean_object* x_1, lean_object* x_2) {
|
||||
|
|
@ -5075,18 +5001,16 @@ l_String_HasAppend___closed__1 = _init_l_String_HasAppend___closed__1();
|
|||
lean_mark_persistent(l_String_HasAppend___closed__1);
|
||||
l_String_HasAppend = _init_l_String_HasAppend();
|
||||
lean_mark_persistent(l_String_HasAppend);
|
||||
l_Substring_drop___closed__1 = _init_l_Substring_drop___closed__1();
|
||||
lean_mark_persistent(l_Substring_drop___closed__1);
|
||||
l_Substring_drop___closed__2 = _init_l_Substring_drop___closed__2();
|
||||
lean_mark_persistent(l_Substring_drop___closed__2);
|
||||
l_Substring_extract___closed__1 = _init_l_Substring_extract___closed__1();
|
||||
lean_mark_persistent(l_Substring_extract___closed__1);
|
||||
l_Substring_splitOnAux___main___closed__1 = _init_l_Substring_splitOnAux___main___closed__1();
|
||||
lean_mark_persistent(l_Substring_splitOnAux___main___closed__1);
|
||||
l_Substring_splitOnAux___main___closed__2 = _init_l_Substring_splitOnAux___main___closed__2();
|
||||
lean_mark_persistent(l_Substring_splitOnAux___main___closed__2);
|
||||
l_Substring_hasBeq___closed__1 = _init_l_Substring_hasBeq___closed__1();
|
||||
lean_mark_persistent(l_Substring_hasBeq___closed__1);
|
||||
l_Substring_hasBeq = _init_l_Substring_hasBeq();
|
||||
lean_mark_persistent(l_Substring_hasBeq);
|
||||
l_String_drop___closed__1 = _init_l_String_drop___closed__1();
|
||||
lean_mark_persistent(l_String_drop___closed__1);
|
||||
return lean_mk_io_result(lean_box(0));
|
||||
}
|
||||
#ifdef __cplusplus
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ lean_object* l_Lean_mkHole___closed__3;
|
|||
lean_object* l___private_Init_LeanInit_13__filterSepElemsMAux___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_mkCIdentFrom(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_mkCTermIdFrom___boxed(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Syntax_getIdOfTermId(lean_object*);
|
||||
lean_object* lean_string_push(lean_object*, uint32_t);
|
||||
lean_object* l___private_Init_LeanInit_9__decodeHexLitAux___main___boxed(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Name_toString___closed__1;
|
||||
|
|
@ -275,6 +276,7 @@ lean_object* l_Array_filterSepElems(lean_object*, lean_object*);
|
|||
lean_object* l_Array_mapSepElemsM___at_Array_mapSepElems___spec__1(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Syntax_identToAtom(lean_object*);
|
||||
lean_object* lean_panic_fn(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Syntax_getIdOfTermId___boxed(lean_object*);
|
||||
lean_object* l_Lean_Name_Name_beq___boxed(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Syntax_getHeadInfo___boxed(lean_object*);
|
||||
lean_object* l_Lean_Syntax_getOptionalIdent_x3f(lean_object*);
|
||||
|
|
@ -6069,6 +6071,64 @@ x_4 = l_Lean_Syntax_isTermId_x3f(x_1, x_3);
|
|||
return x_4;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Syntax_getIdOfTermId(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
if (lean_obj_tag(x_1) == 1)
|
||||
{
|
||||
lean_object* x_2; lean_object* x_3; lean_object* x_4; uint8_t x_5;
|
||||
x_2 = lean_ctor_get(x_1, 0);
|
||||
x_3 = lean_ctor_get(x_1, 1);
|
||||
x_4 = l_Lean_mkTermIdFromIdent___closed__2;
|
||||
x_5 = lean_name_eq(x_2, x_4);
|
||||
if (x_5 == 0)
|
||||
{
|
||||
lean_object* x_6;
|
||||
x_6 = lean_box(0);
|
||||
return x_6;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_7; lean_object* x_8; uint8_t x_9;
|
||||
x_7 = lean_array_get_size(x_3);
|
||||
x_8 = lean_unsigned_to_nat(2u);
|
||||
x_9 = lean_nat_dec_eq(x_7, x_8);
|
||||
lean_dec(x_7);
|
||||
if (x_9 == 0)
|
||||
{
|
||||
lean_object* x_10;
|
||||
x_10 = lean_box(0);
|
||||
return x_10;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14;
|
||||
x_11 = l_Lean_Syntax_inhabited;
|
||||
x_12 = lean_unsigned_to_nat(0u);
|
||||
x_13 = lean_array_get(x_11, x_3, x_12);
|
||||
x_14 = l_Lean_Syntax_getId(x_13);
|
||||
lean_dec(x_13);
|
||||
return x_14;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_15;
|
||||
x_15 = lean_box(0);
|
||||
return x_15;
|
||||
}
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Syntax_getIdOfTermId___boxed(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_2;
|
||||
x_2 = l_Lean_Syntax_getIdOfTermId(x_1);
|
||||
lean_dec(x_1);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Syntax_isSimpleTermId_x3f(lean_object* x_1, uint8_t x_2) {
|
||||
_start:
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1704,7 +1704,6 @@ else
|
|||
lean_object* x_16; lean_object* x_17; uint8_t x_18;
|
||||
x_16 = lean_unsigned_to_nat(1u);
|
||||
x_17 = l_String_dropRight(x_5, x_16);
|
||||
lean_dec(x_5);
|
||||
x_18 = l_System_Platform_isWindows;
|
||||
if (x_18 == 0)
|
||||
{
|
||||
|
|
@ -1730,7 +1729,6 @@ else
|
|||
{
|
||||
lean_object* x_26; lean_object* x_27; lean_object* x_28;
|
||||
x_26 = l_String_dropRight(x_17, x_16);
|
||||
lean_dec(x_17);
|
||||
x_27 = lean_array_push(x_2, x_26);
|
||||
x_28 = l_IO_FS_linesAux___main___rarg(x_1, x_3, x_4, x_27);
|
||||
return x_28;
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ extern lean_object* l_Array_empty___closed__1;
|
|||
uint8_t l_Char_isDigit(uint32_t);
|
||||
lean_object* lean_io_ref_get(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_registerEnvExtensionUnsafe___at_Lean_mkExportAttr___spec__7(lean_object*, lean_object*);
|
||||
uint8_t l_String_anyAux___main___at___private_Lean_Compiler_ExportAttr_1__isValidCppId___spec__2(uint8_t, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Substring_nextn___main(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_mkExportAttr___lambda__1___closed__3;
|
||||
lean_object* l_Lean_mkExportAttr___closed__2;
|
||||
lean_object* lean_array_push(lean_object*, lean_object*);
|
||||
|
|
@ -43,7 +43,6 @@ lean_object* lean_string_append(lean_object*, lean_object*);
|
|||
lean_object* l_Lean_registerParametricAttribute___at_Lean_mkExportAttr___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Array_binSearchAux___main___at_Lean_getExportNameFor___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
extern lean_object* l_Lean_Name_inhabited;
|
||||
extern lean_object* l_String_splitAux___main___closed__1;
|
||||
lean_object* l_Lean_registerParametricAttribute___at_Lean_mkExportAttr___spec__1___closed__1;
|
||||
lean_object* l_Lean_ParametricAttribute_getParam___at_Lean_getExportNameFor___spec__1___boxed(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* lean_string_utf8_byte_size(lean_object*);
|
||||
|
|
@ -61,7 +60,6 @@ uint8_t lean_nat_dec_eq(lean_object*, lean_object*);
|
|||
lean_object* l_Lean_mkExportAttr___lambda__1___boxed(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_EStateM_bind___rarg(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* lean_nat_sub(lean_object*, lean_object*);
|
||||
lean_object* l_String_anyAux___main___at___private_Lean_Compiler_ExportAttr_1__isValidCppId___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* lean_array_swap(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_mkExportAttr___lambda__1___closed__1;
|
||||
uint8_t l___private_Lean_Compiler_ExportAttr_2__isValidCppName(lean_object*);
|
||||
|
|
@ -83,7 +81,6 @@ uint8_t l_Lean_isExport(lean_object*, lean_object*);
|
|||
uint8_t l_Char_isAlpha(uint32_t);
|
||||
extern lean_object* l___private_Lean_Environment_5__envExtensionsRef;
|
||||
lean_object* l_Lean_exportAttr;
|
||||
extern lean_object* l_Substring_drop___closed__1;
|
||||
extern lean_object* l_Lean_registerPersistentEnvExtensionUnsafe___rarg___closed__3;
|
||||
uint8_t l_UInt32_decEq(uint32_t, uint32_t);
|
||||
extern lean_object* l_Lean_registerPersistentEnvExtensionUnsafe___rarg___closed__1;
|
||||
|
|
@ -212,102 +209,6 @@ return x_24;
|
|||
}
|
||||
}
|
||||
}
|
||||
uint8_t l_String_anyAux___main___at___private_Lean_Compiler_ExportAttr_1__isValidCppId___spec__2(uint8_t x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
_start:
|
||||
{
|
||||
uint8_t x_5;
|
||||
x_5 = lean_nat_dec_eq(x_4, x_3);
|
||||
if (x_5 == 0)
|
||||
{
|
||||
uint32_t x_6; uint8_t x_7;
|
||||
x_6 = lean_string_utf8_get(x_2, x_4);
|
||||
x_7 = l_Char_isAlpha(x_6);
|
||||
if (x_7 == 0)
|
||||
{
|
||||
uint8_t x_8;
|
||||
x_8 = l_Char_isDigit(x_6);
|
||||
if (x_8 == 0)
|
||||
{
|
||||
uint32_t x_9; uint8_t x_10;
|
||||
x_9 = 95;
|
||||
x_10 = x_6 == x_9;
|
||||
if (x_10 == 0)
|
||||
{
|
||||
uint8_t x_11;
|
||||
lean_dec(x_4);
|
||||
x_11 = 1;
|
||||
return x_11;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_12;
|
||||
x_12 = lean_string_utf8_next(x_2, x_4);
|
||||
lean_dec(x_4);
|
||||
x_4 = x_12;
|
||||
goto _start;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (x_1 == 0)
|
||||
{
|
||||
uint8_t x_14;
|
||||
lean_dec(x_4);
|
||||
x_14 = 1;
|
||||
return x_14;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_15;
|
||||
x_15 = lean_string_utf8_next(x_2, x_4);
|
||||
lean_dec(x_4);
|
||||
x_4 = x_15;
|
||||
goto _start;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (x_1 == 0)
|
||||
{
|
||||
uint32_t x_17; uint8_t x_18;
|
||||
x_17 = 95;
|
||||
x_18 = x_6 == x_17;
|
||||
if (x_18 == 0)
|
||||
{
|
||||
uint8_t x_19;
|
||||
lean_dec(x_4);
|
||||
x_19 = 1;
|
||||
return x_19;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_20;
|
||||
x_20 = lean_string_utf8_next(x_2, x_4);
|
||||
lean_dec(x_4);
|
||||
x_4 = x_20;
|
||||
goto _start;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_22;
|
||||
x_22 = lean_string_utf8_next(x_2, x_4);
|
||||
lean_dec(x_4);
|
||||
x_4 = x_22;
|
||||
goto _start;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_24;
|
||||
lean_dec(x_4);
|
||||
x_24 = 0;
|
||||
return x_24;
|
||||
}
|
||||
}
|
||||
}
|
||||
uint8_t l___private_Lean_Compiler_ExportAttr_1__isValidCppId(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
|
|
@ -318,52 +219,37 @@ x_4 = l_Char_isAlpha(x_3);
|
|||
if (x_4 == 0)
|
||||
{
|
||||
uint8_t x_5;
|
||||
lean_dec(x_1);
|
||||
x_5 = 0;
|
||||
return x_5;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_6; lean_object* x_7; uint8_t x_8;
|
||||
lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; uint8_t x_10;
|
||||
x_6 = lean_string_utf8_byte_size(x_1);
|
||||
x_7 = lean_unsigned_to_nat(1u);
|
||||
x_8 = lean_nat_dec_le(x_6, x_7);
|
||||
if (x_8 == 0)
|
||||
{
|
||||
uint8_t x_9;
|
||||
x_9 = l_String_anyAux___main___at___private_Lean_Compiler_ExportAttr_1__isValidCppId___spec__1(x_4, x_1, x_6, x_7);
|
||||
lean_inc(x_6);
|
||||
lean_inc(x_1);
|
||||
x_7 = lean_alloc_ctor(0, 3, 0);
|
||||
lean_ctor_set(x_7, 0, x_1);
|
||||
lean_ctor_set(x_7, 1, x_2);
|
||||
lean_ctor_set(x_7, 2, x_6);
|
||||
x_8 = lean_unsigned_to_nat(1u);
|
||||
x_9 = l_Substring_nextn___main(x_7, x_8, x_2);
|
||||
lean_dec(x_7);
|
||||
x_10 = l_String_anyAux___main___at___private_Lean_Compiler_ExportAttr_1__isValidCppId___spec__1(x_4, x_1, x_6, x_9);
|
||||
lean_dec(x_6);
|
||||
if (x_9 == 0)
|
||||
{
|
||||
uint8_t x_10;
|
||||
x_10 = 1;
|
||||
return x_10;
|
||||
}
|
||||
else
|
||||
lean_dec(x_1);
|
||||
if (x_10 == 0)
|
||||
{
|
||||
uint8_t x_11;
|
||||
x_11 = 0;
|
||||
x_11 = 1;
|
||||
return x_11;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_12; lean_object* x_13; uint8_t x_14;
|
||||
lean_dec(x_6);
|
||||
x_12 = l_String_splitAux___main___closed__1;
|
||||
x_13 = l_Substring_drop___closed__1;
|
||||
x_14 = l_String_anyAux___main___at___private_Lean_Compiler_ExportAttr_1__isValidCppId___spec__2(x_4, x_12, x_13, x_2);
|
||||
if (x_14 == 0)
|
||||
{
|
||||
uint8_t x_15;
|
||||
x_15 = 1;
|
||||
return x_15;
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_16;
|
||||
x_16 = 0;
|
||||
return x_16;
|
||||
}
|
||||
uint8_t x_12;
|
||||
x_12 = 0;
|
||||
return x_12;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -381,25 +267,11 @@ x_7 = lean_box(x_6);
|
|||
return x_7;
|
||||
}
|
||||
}
|
||||
lean_object* l_String_anyAux___main___at___private_Lean_Compiler_ExportAttr_1__isValidCppId___spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
_start:
|
||||
{
|
||||
uint8_t x_5; uint8_t x_6; lean_object* x_7;
|
||||
x_5 = lean_unbox(x_1);
|
||||
lean_dec(x_1);
|
||||
x_6 = l_String_anyAux___main___at___private_Lean_Compiler_ExportAttr_1__isValidCppId___spec__2(x_5, x_2, x_3, x_4);
|
||||
lean_dec(x_3);
|
||||
lean_dec(x_2);
|
||||
x_7 = lean_box(x_6);
|
||||
return x_7;
|
||||
}
|
||||
}
|
||||
lean_object* l___private_Lean_Compiler_ExportAttr_1__isValidCppId___boxed(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
uint8_t x_2; lean_object* x_3;
|
||||
x_2 = l___private_Lean_Compiler_ExportAttr_1__isValidCppId(x_1);
|
||||
lean_dec(x_1);
|
||||
x_3 = lean_box(x_2);
|
||||
return x_3;
|
||||
}
|
||||
|
|
@ -411,7 +283,10 @@ if (lean_obj_tag(x_1) == 1)
|
|||
{
|
||||
lean_object* x_2; lean_object* x_3; lean_object* x_4;
|
||||
x_2 = lean_ctor_get(x_1, 0);
|
||||
lean_inc(x_2);
|
||||
x_3 = lean_ctor_get(x_1, 1);
|
||||
lean_inc(x_3);
|
||||
lean_dec(x_1);
|
||||
if (lean_obj_tag(x_2) == 0)
|
||||
{
|
||||
uint8_t x_9;
|
||||
|
|
@ -433,6 +308,7 @@ x_5 = l___private_Lean_Compiler_ExportAttr_1__isValidCppId(x_3);
|
|||
if (x_5 == 0)
|
||||
{
|
||||
uint8_t x_6;
|
||||
lean_dec(x_2);
|
||||
x_6 = 0;
|
||||
return x_6;
|
||||
}
|
||||
|
|
@ -446,6 +322,7 @@ goto _start;
|
|||
else
|
||||
{
|
||||
uint8_t x_11;
|
||||
lean_dec(x_1);
|
||||
x_11 = 0;
|
||||
return x_11;
|
||||
}
|
||||
|
|
@ -456,7 +333,6 @@ _start:
|
|||
{
|
||||
uint8_t x_2; lean_object* x_3;
|
||||
x_2 = l___private_Lean_Compiler_ExportAttr_2__isValidCppName___main(x_1);
|
||||
lean_dec(x_1);
|
||||
x_3 = lean_box(x_2);
|
||||
return x_3;
|
||||
}
|
||||
|
|
@ -474,7 +350,6 @@ _start:
|
|||
{
|
||||
uint8_t x_2; lean_object* x_3;
|
||||
x_2 = l___private_Lean_Compiler_ExportAttr_2__isValidCppName(x_1);
|
||||
lean_dec(x_1);
|
||||
x_3 = lean_box(x_2);
|
||||
return x_3;
|
||||
}
|
||||
|
|
@ -1662,6 +1537,7 @@ lean_object* x_6; uint8_t x_7;
|
|||
x_6 = lean_ctor_get(x_4, 0);
|
||||
lean_inc(x_6);
|
||||
lean_dec(x_4);
|
||||
lean_inc(x_6);
|
||||
x_7 = l___private_Lean_Compiler_ExportAttr_2__isValidCppName___main(x_6);
|
||||
if (x_7 == 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -172,7 +172,6 @@ lean_object* l___regBuiltin_Lean_Delaborator_delabCoe___closed__2;
|
|||
lean_object* l_Lean_Delaborator_delabSort___closed__10;
|
||||
extern lean_object* l_Lean_EnvExtension_Inhabited___rarg___closed__1;
|
||||
extern lean_object* l_Lean_Parser_Term_type___elambda__1___closed__5;
|
||||
extern lean_object* l_Lean_Elab_Term_elabArrayLit___closed__11;
|
||||
extern lean_object* l_Lean_numLitKind;
|
||||
lean_object* l_Lean_Delaborator_delabForall___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Delaborator_delabFVar(lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -256,6 +255,7 @@ lean_object* l_Std_RBNode_find___main___at_Lean_Delaborator_getPPOption___spec__
|
|||
lean_object* l_Lean_Level_getOffsetAux___main(lean_object*, lean_object*);
|
||||
extern lean_object* l_Lean_Meta_evalNat___main___closed__6;
|
||||
lean_object* l_Lean_Delaborator_withBindingBody___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
extern lean_object* l_Lean_Elab_Term_expandArrayLit___closed__9;
|
||||
lean_object* l_ReaderT_failure___at_Lean_Delaborator_DelabM_inhabited___spec__1(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Std_AssocList_find_x3f___main___at_Lean_Delaborator_delabFor___main___spec__6___boxed(lean_object*, lean_object*);
|
||||
lean_object* l_Std_AssocList_find_x3f___main___at_Lean_Delaborator_delabFor___main___spec__6(lean_object*, lean_object*);
|
||||
|
|
@ -270,6 +270,7 @@ uint8_t l_Lean_Expr_isConst(lean_object*);
|
|||
uint8_t l_Array_isEmpty___rarg(lean_object*);
|
||||
extern lean_object* l_Lean_Parser_Term_arrow___elambda__1___closed__2;
|
||||
lean_object* l_Lean_Delaborator_withBindingDomain(lean_object*);
|
||||
extern lean_object* l_Lean_Elab_Term_expandArrayLit___closed__8;
|
||||
lean_object* l_Array_umapMAux___main___at_Lean_Delaborator_delabConst___spec__1(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Delaborator_delabProjectionApp(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_List_redLength___main___rarg(lean_object*);
|
||||
|
|
@ -306,7 +307,6 @@ extern lean_object* l_Lean_Meta_mkAuxName___closed__1;
|
|||
lean_object* l_Lean_Delaborator_delabAppImplicit___closed__6;
|
||||
lean_object* l_Lean_Delaborator_delabProjectionApp___closed__2;
|
||||
lean_object* l_Lean_Delaborator_getExprKind___closed__5;
|
||||
extern lean_object* l_Lean_Elab_Term_elabArrayLit___closed__10;
|
||||
lean_object* l_Lean_Delaborator_getExprKind___closed__22;
|
||||
extern lean_object* l_Lean_Parser_Level_hole___elambda__1___closed__1;
|
||||
extern lean_object* l_Lean_mkAppStx___closed__3;
|
||||
|
|
@ -14549,10 +14549,10 @@ x_372 = l_Lean_nullKind___closed__2;
|
|||
x_373 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_373, 0, x_372);
|
||||
lean_ctor_set(x_373, 1, x_371);
|
||||
x_374 = l_Lean_Elab_Term_elabArrayLit___closed__10;
|
||||
x_374 = l_Lean_Elab_Term_expandArrayLit___closed__8;
|
||||
x_375 = lean_array_push(x_374, x_373);
|
||||
x_376 = lean_array_push(x_375, x_20);
|
||||
x_377 = l_Lean_Elab_Term_elabArrayLit___closed__11;
|
||||
x_377 = l_Lean_Elab_Term_expandArrayLit___closed__9;
|
||||
x_378 = lean_array_push(x_376, x_377);
|
||||
x_379 = l_Lean_Parser_Term_instBinder___elambda__1___closed__2;
|
||||
x_380 = lean_alloc_ctor(1, 2, 0);
|
||||
|
|
@ -15826,10 +15826,10 @@ x_854 = l_Lean_nullKind___closed__2;
|
|||
x_855 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_855, 0, x_854);
|
||||
lean_ctor_set(x_855, 1, x_853);
|
||||
x_856 = l_Lean_Elab_Term_elabArrayLit___closed__10;
|
||||
x_856 = l_Lean_Elab_Term_expandArrayLit___closed__8;
|
||||
x_857 = lean_array_push(x_856, x_855);
|
||||
x_858 = lean_array_push(x_857, x_20);
|
||||
x_859 = l_Lean_Elab_Term_elabArrayLit___closed__11;
|
||||
x_859 = l_Lean_Elab_Term_expandArrayLit___closed__9;
|
||||
x_860 = lean_array_push(x_858, x_859);
|
||||
x_861 = l_Lean_Parser_Term_instBinder___elambda__1___closed__2;
|
||||
x_862 = lean_alloc_ctor(1, 2, 0);
|
||||
|
|
@ -16476,10 +16476,10 @@ x_78 = l_Lean_nullKind___closed__2;
|
|||
x_79 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_79, 0, x_78);
|
||||
lean_ctor_set(x_79, 1, x_77);
|
||||
x_80 = l_Lean_Elab_Term_elabArrayLit___closed__10;
|
||||
x_80 = l_Lean_Elab_Term_expandArrayLit___closed__8;
|
||||
x_81 = lean_array_push(x_80, x_79);
|
||||
x_82 = lean_array_push(x_81, x_23);
|
||||
x_83 = l_Lean_Elab_Term_elabArrayLit___closed__11;
|
||||
x_83 = l_Lean_Elab_Term_expandArrayLit___closed__9;
|
||||
x_84 = lean_array_push(x_82, x_83);
|
||||
x_85 = l_Lean_Parser_Term_instBinder___elambda__1___closed__2;
|
||||
x_86 = lean_alloc_ctor(1, 2, 0);
|
||||
|
|
@ -16631,10 +16631,10 @@ x_153 = l_Lean_nullKind___closed__2;
|
|||
x_154 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_154, 0, x_153);
|
||||
lean_ctor_set(x_154, 1, x_152);
|
||||
x_155 = l_Lean_Elab_Term_elabArrayLit___closed__10;
|
||||
x_155 = l_Lean_Elab_Term_expandArrayLit___closed__8;
|
||||
x_156 = lean_array_push(x_155, x_154);
|
||||
x_157 = lean_array_push(x_156, x_96);
|
||||
x_158 = l_Lean_Elab_Term_elabArrayLit___closed__11;
|
||||
x_158 = l_Lean_Elab_Term_expandArrayLit___closed__9;
|
||||
x_159 = lean_array_push(x_157, x_158);
|
||||
x_160 = l_Lean_Parser_Term_instBinder___elambda__1___closed__2;
|
||||
x_161 = lean_alloc_ctor(1, 2, 0);
|
||||
|
|
@ -16809,10 +16809,10 @@ x_233 = l_Lean_nullKind___closed__2;
|
|||
x_234 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_234, 0, x_233);
|
||||
lean_ctor_set(x_234, 1, x_232);
|
||||
x_235 = l_Lean_Elab_Term_elabArrayLit___closed__10;
|
||||
x_235 = l_Lean_Elab_Term_expandArrayLit___closed__8;
|
||||
x_236 = lean_array_push(x_235, x_234);
|
||||
x_237 = lean_array_push(x_236, x_173);
|
||||
x_238 = l_Lean_Elab_Term_elabArrayLit___closed__11;
|
||||
x_238 = l_Lean_Elab_Term_expandArrayLit___closed__9;
|
||||
x_239 = lean_array_push(x_237, x_238);
|
||||
x_240 = l_Lean_Parser_Term_instBinder___elambda__1___closed__2;
|
||||
x_241 = lean_alloc_ctor(1, 2, 0);
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -254,7 +254,6 @@ lean_object* l_Lean_Elab_Command_expandElab___closed__49;
|
|||
lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__61;
|
||||
lean_object* l___regBuiltin_Lean_Elab_Command_elabSyntaxAbbrev(lean_object*);
|
||||
lean_object* l_Lean_Elab_Command_elabNoKindMacroRulesAux___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
extern lean_object* l_Lean_Elab_Term_elabArrayLit___closed__11;
|
||||
extern lean_object* l_Lean_numLitKind;
|
||||
lean_object* l_Lean_Elab_Command_expandElab___closed__33;
|
||||
extern lean_object* l_Lean_Parser_Syntax_num___elambda__1___closed__1;
|
||||
|
|
@ -380,6 +379,7 @@ lean_object* l_Lean_Elab_Command_expandElab___closed__53;
|
|||
lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__12;
|
||||
extern lean_object* l_Lean_Parser_Term_match__syntax___elambda__1___closed__1;
|
||||
lean_object* l_Lean_Elab_Command_mkKindName___closed__1;
|
||||
extern lean_object* l_Lean_Elab_Term_expandArrayLit___closed__9;
|
||||
lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__26;
|
||||
lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__89;
|
||||
lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__47;
|
||||
|
|
@ -409,6 +409,7 @@ extern lean_object* l_Lean_Elab_Term_elabArrow___lambda__1___closed__4;
|
|||
lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__25;
|
||||
lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Command_elabSyntax___closed__3;
|
||||
extern lean_object* l_Lean_Elab_Term_expandArrayLit___closed__8;
|
||||
extern lean_object* l___private_Lean_Elab_Quotation_5__explodeHeadPat___lambda__1___closed__3;
|
||||
extern lean_object* l_Lean_Parser_Command_macroArgSimple___elambda__1___closed__2;
|
||||
extern lean_object* l_Lean_Parser_Term_tacticStxQuot___elambda__1___closed__2;
|
||||
|
|
@ -452,7 +453,6 @@ extern lean_object* l_Lean_nullKind___closed__2;
|
|||
lean_object* l_Lean_Elab_Command_expandElab___closed__41;
|
||||
lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__7;
|
||||
extern lean_object* l_Lean_Parser_Syntax_lookahead___elambda__1___closed__1;
|
||||
extern lean_object* l_Lean_Elab_Term_elabArrayLit___closed__10;
|
||||
extern lean_object* l_Lean_Parser_Syntax_sepBy1___elambda__1___closed__2;
|
||||
lean_object* l_Lean_mkAtomFrom(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Command_elabSyntaxAbbrev___closed__1;
|
||||
|
|
@ -9313,7 +9313,7 @@ lean_ctor_set(x_29, 0, x_28);
|
|||
lean_ctor_set(x_29, 1, x_27);
|
||||
x_30 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__2;
|
||||
x_31 = lean_array_push(x_30, x_29);
|
||||
x_32 = l_Lean_Elab_Term_elabArrayLit___closed__11;
|
||||
x_32 = l_Lean_Elab_Term_expandArrayLit___closed__9;
|
||||
x_33 = lean_array_push(x_31, x_32);
|
||||
x_34 = l_Lean_Parser_Command_attributes___elambda__1___closed__2;
|
||||
x_35 = lean_alloc_ctor(1, 2, 0);
|
||||
|
|
@ -10880,7 +10880,7 @@ lean_ctor_set(x_44, 0, x_43);
|
|||
lean_ctor_set(x_44, 1, x_42);
|
||||
x_45 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__2;
|
||||
x_46 = lean_array_push(x_45, x_44);
|
||||
x_47 = l_Lean_Elab_Term_elabArrayLit___closed__11;
|
||||
x_47 = l_Lean_Elab_Term_expandArrayLit___closed__9;
|
||||
x_48 = lean_array_push(x_46, x_47);
|
||||
x_49 = l_Lean_Parser_Command_attributes___elambda__1___closed__2;
|
||||
x_50 = lean_alloc_ctor(1, 2, 0);
|
||||
|
|
@ -11217,7 +11217,7 @@ lean_ctor_set(x_180, 0, x_179);
|
|||
lean_ctor_set(x_180, 1, x_178);
|
||||
x_181 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__2;
|
||||
x_182 = lean_array_push(x_181, x_180);
|
||||
x_183 = l_Lean_Elab_Term_elabArrayLit___closed__11;
|
||||
x_183 = l_Lean_Elab_Term_expandArrayLit___closed__9;
|
||||
x_184 = lean_array_push(x_182, x_183);
|
||||
x_185 = l_Lean_Parser_Command_attributes___elambda__1___closed__2;
|
||||
x_186 = lean_alloc_ctor(1, 2, 0);
|
||||
|
|
@ -13278,7 +13278,7 @@ lean_ctor_set(x_31, 0, x_25);
|
|||
lean_ctor_set(x_31, 1, x_30);
|
||||
x_32 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__2;
|
||||
x_33 = lean_array_push(x_32, x_31);
|
||||
x_34 = l_Lean_Elab_Term_elabArrayLit___closed__11;
|
||||
x_34 = l_Lean_Elab_Term_expandArrayLit___closed__9;
|
||||
x_35 = lean_array_push(x_33, x_34);
|
||||
x_36 = l_Lean_Parser_Command_attributes___elambda__1___closed__2;
|
||||
x_37 = lean_alloc_ctor(1, 2, 0);
|
||||
|
|
@ -13503,7 +13503,7 @@ lean_ctor_set(x_163, 0, x_157);
|
|||
lean_ctor_set(x_163, 1, x_162);
|
||||
x_164 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__2;
|
||||
x_165 = lean_array_push(x_164, x_163);
|
||||
x_166 = l_Lean_Elab_Term_elabArrayLit___closed__11;
|
||||
x_166 = l_Lean_Elab_Term_expandArrayLit___closed__9;
|
||||
x_167 = lean_array_push(x_165, x_166);
|
||||
x_168 = l_Lean_Parser_Command_attributes___elambda__1___closed__2;
|
||||
x_169 = lean_alloc_ctor(1, 2, 0);
|
||||
|
|
@ -16127,9 +16127,9 @@ if (lean_obj_tag(x_2) == 0)
|
|||
{
|
||||
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_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; 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; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73;
|
||||
x_30 = l_Lean_mkIdentFrom(x_1, x_9);
|
||||
x_31 = l_Lean_Elab_Term_elabArrayLit___closed__10;
|
||||
x_31 = l_Lean_Elab_Term_expandArrayLit___closed__8;
|
||||
x_32 = lean_array_push(x_31, x_30);
|
||||
x_33 = l_Lean_Elab_Term_elabArrayLit___closed__11;
|
||||
x_33 = l_Lean_Elab_Term_expandArrayLit___closed__9;
|
||||
x_34 = lean_array_push(x_32, x_33);
|
||||
x_35 = l_Lean_nullKind___closed__2;
|
||||
x_36 = lean_alloc_ctor(1, 2, 0);
|
||||
|
|
@ -16215,9 +16215,9 @@ lean_ctor_set(x_82, 1, x_80);
|
|||
x_83 = l___private_Lean_Elab_Syntax_9__expandNotationAux___closed__2;
|
||||
x_84 = lean_array_push(x_83, x_82);
|
||||
x_85 = l_Lean_mkIdentFrom(x_1, x_9);
|
||||
x_86 = l_Lean_Elab_Term_elabArrayLit___closed__10;
|
||||
x_86 = l_Lean_Elab_Term_expandArrayLit___closed__8;
|
||||
x_87 = lean_array_push(x_86, x_85);
|
||||
x_88 = l_Lean_Elab_Term_elabArrayLit___closed__11;
|
||||
x_88 = l_Lean_Elab_Term_expandArrayLit___closed__9;
|
||||
x_89 = lean_array_push(x_87, x_88);
|
||||
x_90 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_90, 0, x_81);
|
||||
|
|
@ -16296,9 +16296,9 @@ if (lean_obj_tag(x_2) == 0)
|
|||
{
|
||||
lean_object* x_129; lean_object* x_130; lean_object* x_131; lean_object* x_132; lean_object* x_133; lean_object* x_134; lean_object* x_135; lean_object* x_136; lean_object* x_137; lean_object* x_138; lean_object* x_139; lean_object* x_140; lean_object* x_141; lean_object* x_142; lean_object* x_143; lean_object* x_144; lean_object* x_145; lean_object* x_146; lean_object* x_147; lean_object* x_148; lean_object* x_149; lean_object* x_150; lean_object* x_151; lean_object* x_152; lean_object* x_153; lean_object* x_154; lean_object* x_155; lean_object* x_156; lean_object* x_157; lean_object* x_158; lean_object* x_159; lean_object* x_160; lean_object* x_161; lean_object* x_162; lean_object* x_163; lean_object* x_164; lean_object* x_165; lean_object* x_166; lean_object* x_167; lean_object* x_168; lean_object* x_169; lean_object* x_170; lean_object* x_171; lean_object* x_172; lean_object* x_173;
|
||||
x_129 = l_Lean_mkIdentFrom(x_1, x_9);
|
||||
x_130 = l_Lean_Elab_Term_elabArrayLit___closed__10;
|
||||
x_130 = l_Lean_Elab_Term_expandArrayLit___closed__8;
|
||||
x_131 = lean_array_push(x_130, x_129);
|
||||
x_132 = l_Lean_Elab_Term_elabArrayLit___closed__11;
|
||||
x_132 = l_Lean_Elab_Term_expandArrayLit___closed__9;
|
||||
x_133 = lean_array_push(x_131, x_132);
|
||||
x_134 = l_Lean_nullKind___closed__2;
|
||||
x_135 = lean_alloc_ctor(1, 2, 0);
|
||||
|
|
@ -16386,9 +16386,9 @@ lean_ctor_set(x_182, 1, x_180);
|
|||
x_183 = l___private_Lean_Elab_Syntax_9__expandNotationAux___closed__2;
|
||||
x_184 = lean_array_push(x_183, x_182);
|
||||
x_185 = l_Lean_mkIdentFrom(x_1, x_9);
|
||||
x_186 = l_Lean_Elab_Term_elabArrayLit___closed__10;
|
||||
x_186 = l_Lean_Elab_Term_expandArrayLit___closed__8;
|
||||
x_187 = lean_array_push(x_186, x_185);
|
||||
x_188 = l_Lean_Elab_Term_elabArrayLit___closed__11;
|
||||
x_188 = l_Lean_Elab_Term_expandArrayLit___closed__9;
|
||||
x_189 = lean_array_push(x_187, x_188);
|
||||
x_190 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_190, 0, x_181);
|
||||
|
|
@ -17213,9 +17213,9 @@ lean_ctor_set(x_51, 1, x_49);
|
|||
x_52 = l___private_Lean_Elab_Syntax_9__expandNotationAux___closed__2;
|
||||
x_53 = lean_array_push(x_52, x_51);
|
||||
x_54 = l_Lean_mkIdentFrom(x_1, x_17);
|
||||
x_55 = l_Lean_Elab_Term_elabArrayLit___closed__10;
|
||||
x_55 = l_Lean_Elab_Term_expandArrayLit___closed__8;
|
||||
x_56 = lean_array_push(x_55, x_54);
|
||||
x_57 = l_Lean_Elab_Term_elabArrayLit___closed__11;
|
||||
x_57 = l_Lean_Elab_Term_expandArrayLit___closed__9;
|
||||
x_58 = lean_array_push(x_56, x_57);
|
||||
x_59 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_59, 0, x_50);
|
||||
|
|
@ -17292,9 +17292,9 @@ lean_ctor_set(x_100, 1, x_98);
|
|||
x_101 = l___private_Lean_Elab_Syntax_9__expandNotationAux___closed__2;
|
||||
x_102 = lean_array_push(x_101, x_100);
|
||||
x_103 = l_Lean_mkIdentFrom(x_1, x_17);
|
||||
x_104 = l_Lean_Elab_Term_elabArrayLit___closed__10;
|
||||
x_104 = l_Lean_Elab_Term_expandArrayLit___closed__8;
|
||||
x_105 = lean_array_push(x_104, x_103);
|
||||
x_106 = l_Lean_Elab_Term_elabArrayLit___closed__11;
|
||||
x_106 = l_Lean_Elab_Term_expandArrayLit___closed__9;
|
||||
x_107 = lean_array_push(x_105, x_106);
|
||||
x_108 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_108, 0, x_99);
|
||||
|
|
@ -17387,9 +17387,9 @@ lean_ctor_set(x_154, 1, x_152);
|
|||
x_155 = l___private_Lean_Elab_Syntax_9__expandNotationAux___closed__2;
|
||||
x_156 = lean_array_push(x_155, x_154);
|
||||
x_157 = l_Lean_mkIdentFrom(x_1, x_17);
|
||||
x_158 = l_Lean_Elab_Term_elabArrayLit___closed__10;
|
||||
x_158 = l_Lean_Elab_Term_expandArrayLit___closed__8;
|
||||
x_159 = lean_array_push(x_158, x_157);
|
||||
x_160 = l_Lean_Elab_Term_elabArrayLit___closed__11;
|
||||
x_160 = l_Lean_Elab_Term_expandArrayLit___closed__9;
|
||||
x_161 = lean_array_push(x_159, x_160);
|
||||
x_162 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_162, 0, x_153);
|
||||
|
|
@ -17468,9 +17468,9 @@ lean_ctor_set(x_204, 1, x_202);
|
|||
x_205 = l___private_Lean_Elab_Syntax_9__expandNotationAux___closed__2;
|
||||
x_206 = lean_array_push(x_205, x_204);
|
||||
x_207 = l_Lean_mkIdentFrom(x_1, x_17);
|
||||
x_208 = l_Lean_Elab_Term_elabArrayLit___closed__10;
|
||||
x_208 = l_Lean_Elab_Term_expandArrayLit___closed__8;
|
||||
x_209 = lean_array_push(x_208, x_207);
|
||||
x_210 = l_Lean_Elab_Term_elabArrayLit___closed__11;
|
||||
x_210 = l_Lean_Elab_Term_expandArrayLit___closed__9;
|
||||
x_211 = lean_array_push(x_209, x_210);
|
||||
x_212 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_212, 0, x_203);
|
||||
|
|
@ -18642,10 +18642,10 @@ lean_ctor_set(x_68, 0, x_67);
|
|||
lean_ctor_set(x_68, 1, x_66);
|
||||
x_69 = l___private_Lean_Elab_Syntax_9__expandNotationAux___closed__2;
|
||||
x_70 = lean_array_push(x_69, x_68);
|
||||
x_71 = l_Lean_Elab_Term_elabArrayLit___closed__10;
|
||||
x_71 = l_Lean_Elab_Term_expandArrayLit___closed__8;
|
||||
lean_inc(x_48);
|
||||
x_72 = lean_array_push(x_71, x_48);
|
||||
x_73 = l_Lean_Elab_Term_elabArrayLit___closed__11;
|
||||
x_73 = l_Lean_Elab_Term_expandArrayLit___closed__9;
|
||||
x_74 = lean_array_push(x_72, x_73);
|
||||
x_75 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_75, 0, x_67);
|
||||
|
|
@ -18892,10 +18892,10 @@ lean_ctor_set(x_216, 0, x_215);
|
|||
lean_ctor_set(x_216, 1, x_214);
|
||||
x_217 = l___private_Lean_Elab_Syntax_9__expandNotationAux___closed__2;
|
||||
x_218 = lean_array_push(x_217, x_216);
|
||||
x_219 = l_Lean_Elab_Term_elabArrayLit___closed__10;
|
||||
x_219 = l_Lean_Elab_Term_expandArrayLit___closed__8;
|
||||
lean_inc(x_48);
|
||||
x_220 = lean_array_push(x_219, x_48);
|
||||
x_221 = l_Lean_Elab_Term_elabArrayLit___closed__11;
|
||||
x_221 = l_Lean_Elab_Term_expandArrayLit___closed__9;
|
||||
x_222 = lean_array_push(x_220, x_221);
|
||||
x_223 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_223, 0, x_215);
|
||||
|
|
@ -19143,10 +19143,10 @@ lean_ctor_set(x_365, 0, x_364);
|
|||
lean_ctor_set(x_365, 1, x_363);
|
||||
x_366 = l___private_Lean_Elab_Syntax_9__expandNotationAux___closed__2;
|
||||
x_367 = lean_array_push(x_366, x_365);
|
||||
x_368 = l_Lean_Elab_Term_elabArrayLit___closed__10;
|
||||
x_368 = l_Lean_Elab_Term_expandArrayLit___closed__8;
|
||||
lean_inc(x_48);
|
||||
x_369 = lean_array_push(x_368, x_48);
|
||||
x_370 = l_Lean_Elab_Term_elabArrayLit___closed__11;
|
||||
x_370 = l_Lean_Elab_Term_expandArrayLit___closed__9;
|
||||
x_371 = lean_array_push(x_369, x_370);
|
||||
x_372 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_372, 0, x_364);
|
||||
|
|
@ -19424,10 +19424,10 @@ lean_ctor_set(x_526, 0, x_525);
|
|||
lean_ctor_set(x_526, 1, x_524);
|
||||
x_527 = l___private_Lean_Elab_Syntax_9__expandNotationAux___closed__2;
|
||||
x_528 = lean_array_push(x_527, x_526);
|
||||
x_529 = l_Lean_Elab_Term_elabArrayLit___closed__10;
|
||||
x_529 = l_Lean_Elab_Term_expandArrayLit___closed__8;
|
||||
lean_inc(x_48);
|
||||
x_530 = lean_array_push(x_529, x_48);
|
||||
x_531 = l_Lean_Elab_Term_elabArrayLit___closed__11;
|
||||
x_531 = l_Lean_Elab_Term_expandArrayLit___closed__9;
|
||||
x_532 = lean_array_push(x_530, x_531);
|
||||
x_533 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_533, 0, x_525);
|
||||
|
|
@ -19782,10 +19782,10 @@ lean_ctor_set(x_723, 0, x_722);
|
|||
lean_ctor_set(x_723, 1, x_721);
|
||||
x_724 = l___private_Lean_Elab_Syntax_9__expandNotationAux___closed__2;
|
||||
x_725 = lean_array_push(x_724, x_723);
|
||||
x_726 = l_Lean_Elab_Term_elabArrayLit___closed__10;
|
||||
x_726 = l_Lean_Elab_Term_expandArrayLit___closed__8;
|
||||
lean_inc(x_703);
|
||||
x_727 = lean_array_push(x_726, x_703);
|
||||
x_728 = l_Lean_Elab_Term_elabArrayLit___closed__11;
|
||||
x_728 = l_Lean_Elab_Term_expandArrayLit___closed__9;
|
||||
x_729 = lean_array_push(x_727, x_728);
|
||||
x_730 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_730, 0, x_722);
|
||||
|
|
@ -20034,10 +20034,10 @@ lean_ctor_set(x_872, 0, x_871);
|
|||
lean_ctor_set(x_872, 1, x_870);
|
||||
x_873 = l___private_Lean_Elab_Syntax_9__expandNotationAux___closed__2;
|
||||
x_874 = lean_array_push(x_873, x_872);
|
||||
x_875 = l_Lean_Elab_Term_elabArrayLit___closed__10;
|
||||
x_875 = l_Lean_Elab_Term_expandArrayLit___closed__8;
|
||||
lean_inc(x_703);
|
||||
x_876 = lean_array_push(x_875, x_703);
|
||||
x_877 = l_Lean_Elab_Term_elabArrayLit___closed__11;
|
||||
x_877 = l_Lean_Elab_Term_expandArrayLit___closed__9;
|
||||
x_878 = lean_array_push(x_876, x_877);
|
||||
x_879 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_879, 0, x_871);
|
||||
|
|
@ -20287,10 +20287,10 @@ lean_ctor_set(x_1022, 0, x_1021);
|
|||
lean_ctor_set(x_1022, 1, x_1020);
|
||||
x_1023 = l___private_Lean_Elab_Syntax_9__expandNotationAux___closed__2;
|
||||
x_1024 = lean_array_push(x_1023, x_1022);
|
||||
x_1025 = l_Lean_Elab_Term_elabArrayLit___closed__10;
|
||||
x_1025 = l_Lean_Elab_Term_expandArrayLit___closed__8;
|
||||
lean_inc(x_703);
|
||||
x_1026 = lean_array_push(x_1025, x_703);
|
||||
x_1027 = l_Lean_Elab_Term_elabArrayLit___closed__11;
|
||||
x_1027 = l_Lean_Elab_Term_expandArrayLit___closed__9;
|
||||
x_1028 = lean_array_push(x_1026, x_1027);
|
||||
x_1029 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_1029, 0, x_1021);
|
||||
|
|
@ -20569,10 +20569,10 @@ lean_ctor_set(x_1184, 0, x_1183);
|
|||
lean_ctor_set(x_1184, 1, x_1182);
|
||||
x_1185 = l___private_Lean_Elab_Syntax_9__expandNotationAux___closed__2;
|
||||
x_1186 = lean_array_push(x_1185, x_1184);
|
||||
x_1187 = l_Lean_Elab_Term_elabArrayLit___closed__10;
|
||||
x_1187 = l_Lean_Elab_Term_expandArrayLit___closed__8;
|
||||
lean_inc(x_703);
|
||||
x_1188 = lean_array_push(x_1187, x_703);
|
||||
x_1189 = l_Lean_Elab_Term_elabArrayLit___closed__11;
|
||||
x_1189 = l_Lean_Elab_Term_expandArrayLit___closed__9;
|
||||
x_1190 = lean_array_push(x_1188, x_1189);
|
||||
x_1191 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_1191, 0, x_1183);
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -13,6 +13,28 @@
|
|||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
lean_object* lean_mk_antiquot_parenthesizer(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Parser_mkAntiquot_parenthesizer___rarg(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Parser_mkAntiquot_parenthesizer_x27___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* lean_mk_antiquot_parenthesizer(lean_object* x_1, lean_object* x_2, uint8_t x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_8;
|
||||
lean_dec(x_1);
|
||||
x_8 = l_Lean_Parser_mkAntiquot_parenthesizer___rarg(x_2, x_3, x_4, x_5, x_6, x_7);
|
||||
return x_8;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Parser_mkAntiquot_parenthesizer_x27___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) {
|
||||
_start:
|
||||
{
|
||||
uint8_t x_8; lean_object* x_9;
|
||||
x_8 = lean_unbox(x_3);
|
||||
lean_dec(x_3);
|
||||
x_9 = lean_mk_antiquot_parenthesizer(x_1, x_2, x_8, x_4, x_5, x_6, x_7);
|
||||
return x_9;
|
||||
}
|
||||
}
|
||||
lean_object* initialize_Init(lean_object*);
|
||||
lean_object* initialize_Lean_Parser_Parser(lean_object*);
|
||||
lean_object* initialize_Lean_Parser_Level(lean_object*);
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -325,7 +325,6 @@ extern lean_object* l_Lean_strLitKind___closed__2;
|
|||
lean_object* l_Lean_PrettyPrinter_Parenthesizer_monadQuotation___closed__2;
|
||||
lean_object* l_Lean_PrettyPrinter_Parenthesizer_charLitNoAntiquot_parenthesizer___boxed(lean_object*);
|
||||
lean_object* l_Array_iterateM_u2082Aux___main___at_Lean_PrettyPrinter_Parenthesizer_compileParserBody___main___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_PrettyPrinter_Parenthesizer_mkAntiquot_parenthesizer_x27___rarg___boxed(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Syntax_MonadTraverser_goDown___at_Lean_PrettyPrinter_Parenthesizer_visitArgs___spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Nat_repr(lean_object*);
|
||||
extern lean_object* l_Char_HasRepr___closed__1;
|
||||
|
|
@ -472,7 +471,6 @@ lean_object* l_Lean_PrettyPrinter_Parenthesizer_compileParenthesizerDescr___main
|
|||
lean_object* l_Lean_PrettyPrinter_Parenthesizer_compileParserBody___main___lambda__28___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
size_t lean_ptr_addr(lean_object*);
|
||||
lean_object* l_Lean_PrettyPrinter_Parenthesizer_levelParser_parenthesizer___closed__3;
|
||||
extern lean_object* l_Substring_drop___closed__2;
|
||||
lean_object* l_Std_PersistentArray_push___rarg(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_PrettyPrinter_Parenthesizer_compileParserBody___main___lambda__11___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Array_iterateM_u2082Aux___main___at_Lean_PrettyPrinter_Parenthesizer_compileParserBody___main___spec__22___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -572,7 +570,7 @@ extern lean_object* l_Lean_Option_format___rarg___closed__3;
|
|||
lean_object* l_Lean_PrettyPrinter_Parenthesizer_maybeParenthesize___closed__16;
|
||||
lean_object* l_Lean_Meta_getConstInfo(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Array_iterateM_u2082Aux___main___at_Lean_PrettyPrinter_Parenthesizer_compileParserBody___main___spec__22(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_PrettyPrinter_Parenthesizer_mkAntiquot_parenthesizer_x27___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_PrettyPrinter_Parenthesizer_mkAntiquot_parenthesizer_x27___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_mkLambda(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_PrettyPrinter_Parenthesizer_optional_parenthesizer(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_PrettyPrinter_Parenthesizer_checkTailWs_parenthesizer___rarg___boxed(lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -680,13 +678,13 @@ lean_object* l_Lean_PrettyPrinter_Parenthesizer_strLitNoAntiquot_parenthesizer__
|
|||
lean_object* l___private_Init_Data_Array_Basic_3__iterateRevMAux___main___at_Lean_PrettyPrinter_Parenthesizer_compileParserBody___main___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_PrettyPrinter_Parenthesizer_identEq_parenthesizer___boxed(lean_object*);
|
||||
lean_object* l_Lean_PrettyPrinter_Parenthesizer_addPrecCheck___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
extern lean_object* l_Substring_splitOnAux___main___closed__2;
|
||||
lean_object* l_Lean_PrettyPrinter_Parenthesizer_maybeParenthesize___closed__26;
|
||||
extern lean_object* l_Lean_MetavarContext_MkBinding_mkBinding___closed__1;
|
||||
lean_object* l_Lean_PrettyPrinter_Parenthesizer_identNoAntiquot_parenthesizer___rarg(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_PrettyPrinter_Parenthesizer_termParser_parenthesizer___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Syntax_MonadTraverser_getCur___at_Lean_PrettyPrinter_Parenthesizer_visitArgs___spec__1___rarg(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_PrettyPrinter_mkCombinatorParenthesizerAttribute___closed__5;
|
||||
lean_object* l_Lean_PrettyPrinter_Parenthesizer_mkAntiquot_parenthesizer_x27___rarg(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_PrettyPrinter_Parenthesizer_try_parenthesizer(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
extern lean_object* l_Lean_NameGenerator_Inhabited___closed__3;
|
||||
lean_object* l_Lean_PrettyPrinter_Parenthesizer_compileParenthesizerDescr___main___closed__7;
|
||||
|
|
@ -700,7 +698,7 @@ lean_object* l_Lean_PrettyPrinter_Parenthesizer_compileParserBody___main___close
|
|||
lean_object* l_Array_iterateM_u2082Aux___main___at_Lean_PrettyPrinter_Parenthesizer_compileParserBody___main___spec__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
extern lean_object* l_Lean_nameLitKind___closed__1;
|
||||
uint8_t lean_string_dec_eq(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_PrettyPrinter_Parenthesizer_mkAntiquot_parenthesizer_x27(lean_object*, lean_object*, uint8_t, lean_object*);
|
||||
lean_object* lean_mk_antiquot_parenthesizer(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
uint8_t lean_nat_dec_lt(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_PrettyPrinter_Parenthesizer_node_parenthesizer(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_List_forM___main___at_Lean_PrettyPrinter_Parenthesizer_sepBy_parenthesizer___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -2789,7 +2787,7 @@ lean_object* _init_l_Lean_PrettyPrinter_Parenthesizer_maybeParenthesize___closed
|
|||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2;
|
||||
x_1 = l_Substring_drop___closed__2;
|
||||
x_1 = l_Substring_splitOnAux___main___closed__2;
|
||||
x_2 = lean_alloc_ctor(1, 1, 0);
|
||||
lean_ctor_set(x_2, 0, x_1);
|
||||
return x_2;
|
||||
|
|
@ -6054,48 +6052,14 @@ return x_35;
|
|||
}
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_PrettyPrinter_Parenthesizer_mkAntiquot_parenthesizer_x27___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
|
||||
lean_object* l_Lean_PrettyPrinter_Parenthesizer_mkAntiquot_parenthesizer_x27___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) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_4; lean_object* x_5; lean_object* x_6;
|
||||
x_4 = lean_box(0);
|
||||
x_5 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_5, 0, x_4);
|
||||
lean_ctor_set(x_5, 1, x_1);
|
||||
x_6 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_6, 0, x_5);
|
||||
lean_ctor_set(x_6, 1, x_3);
|
||||
return x_6;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_PrettyPrinter_Parenthesizer_mkAntiquot_parenthesizer_x27(lean_object* x_1, lean_object* x_2, uint8_t x_3, lean_object* x_4) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_5;
|
||||
x_5 = lean_alloc_closure((void*)(l_Lean_PrettyPrinter_Parenthesizer_mkAntiquot_parenthesizer_x27___rarg___boxed), 3, 0);
|
||||
return x_5;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_PrettyPrinter_Parenthesizer_mkAntiquot_parenthesizer_x27___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_4;
|
||||
x_4 = l_Lean_PrettyPrinter_Parenthesizer_mkAntiquot_parenthesizer_x27___rarg(x_1, x_2, x_3);
|
||||
lean_dec(x_2);
|
||||
return x_4;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_PrettyPrinter_Parenthesizer_mkAntiquot_parenthesizer_x27___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
_start:
|
||||
{
|
||||
uint8_t x_5; lean_object* x_6;
|
||||
x_5 = lean_unbox(x_3);
|
||||
uint8_t x_8; lean_object* x_9;
|
||||
x_8 = lean_unbox(x_3);
|
||||
lean_dec(x_3);
|
||||
x_6 = l_Lean_PrettyPrinter_Parenthesizer_mkAntiquot_parenthesizer_x27(x_1, x_2, x_5, x_4);
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
return x_6;
|
||||
x_9 = lean_mk_antiquot_parenthesizer(x_1, x_2, x_8, x_4, x_5, x_6, x_7);
|
||||
return x_9;
|
||||
}
|
||||
}
|
||||
lean_object* _init_l_Lean_PrettyPrinter_Parenthesizer_parenthesizerForKind___closed__1() {
|
||||
|
|
@ -6298,7 +6262,7 @@ x_16 = l_Lean_Name_toStringWithSep___main(x_15, x_1);
|
|||
x_17 = lean_box(0);
|
||||
x_18 = 1;
|
||||
x_19 = lean_box(x_18);
|
||||
x_20 = lean_alloc_closure((void*)(l_Lean_PrettyPrinter_Parenthesizer_mkAntiquot_parenthesizer_x27___boxed), 4, 3);
|
||||
x_20 = lean_alloc_closure((void*)(l_Lean_PrettyPrinter_Parenthesizer_mkAntiquot_parenthesizer_x27___boxed), 7, 3);
|
||||
lean_closure_set(x_20, 0, x_16);
|
||||
lean_closure_set(x_20, 1, x_17);
|
||||
lean_closure_set(x_20, 2, x_19);
|
||||
|
|
@ -23480,137 +23444,179 @@ return x_28;
|
|||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_29; lean_object* x_30;
|
||||
lean_object* x_29; lean_object* x_30;
|
||||
lean_dec(x_2);
|
||||
x_29 = 0;
|
||||
lean_inc(x_1);
|
||||
x_30 = l_Lean_PrettyPrinter_Parenthesizer_compile(x_3, x_1, x_29, x_4);
|
||||
x_29 = l_Lean_PrettyPrinter_parenthesizerAttribute;
|
||||
x_30 = l_Lean_KeyedDeclsAttribute_getValues___rarg(x_29, x_3, x_1);
|
||||
if (lean_obj_tag(x_30) == 0)
|
||||
{
|
||||
uint8_t x_31;
|
||||
x_31 = !lean_is_exclusive(x_30);
|
||||
if (x_31 == 0)
|
||||
uint8_t x_31; lean_object* x_32;
|
||||
x_31 = 0;
|
||||
lean_inc(x_1);
|
||||
x_32 = l_Lean_PrettyPrinter_Parenthesizer_compile(x_3, x_1, x_31, x_4);
|
||||
if (lean_obj_tag(x_32) == 0)
|
||||
{
|
||||
lean_object* x_32; lean_object* x_33; lean_object* x_34;
|
||||
x_32 = lean_ctor_get(x_30, 0);
|
||||
x_33 = lean_alloc_closure((void*)(l_Lean_PrettyPrinter_Parenthesizer_parenthesizerForKind), 5, 1);
|
||||
lean_closure_set(x_33, 0, x_1);
|
||||
x_34 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_34, 0, x_33);
|
||||
lean_ctor_set(x_34, 1, x_32);
|
||||
lean_ctor_set(x_30, 0, x_34);
|
||||
return x_30;
|
||||
uint8_t x_33;
|
||||
x_33 = !lean_is_exclusive(x_32);
|
||||
if (x_33 == 0)
|
||||
{
|
||||
lean_object* x_34; lean_object* x_35; lean_object* x_36;
|
||||
x_34 = lean_ctor_get(x_32, 0);
|
||||
x_35 = lean_alloc_closure((void*)(l_Lean_PrettyPrinter_Parenthesizer_parenthesizerForKind), 5, 1);
|
||||
lean_closure_set(x_35, 0, x_1);
|
||||
x_36 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_36, 0, x_35);
|
||||
lean_ctor_set(x_36, 1, x_34);
|
||||
lean_ctor_set(x_32, 0, x_36);
|
||||
return x_32;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39;
|
||||
x_35 = lean_ctor_get(x_30, 0);
|
||||
x_36 = lean_ctor_get(x_30, 1);
|
||||
lean_inc(x_36);
|
||||
lean_inc(x_35);
|
||||
lean_dec(x_30);
|
||||
x_37 = lean_alloc_closure((void*)(l_Lean_PrettyPrinter_Parenthesizer_parenthesizerForKind), 5, 1);
|
||||
lean_closure_set(x_37, 0, x_1);
|
||||
x_38 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_38, 0, x_37);
|
||||
lean_ctor_set(x_38, 1, x_35);
|
||||
x_39 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_39, 0, x_38);
|
||||
lean_ctor_set(x_39, 1, x_36);
|
||||
return x_39;
|
||||
lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41;
|
||||
x_37 = lean_ctor_get(x_32, 0);
|
||||
x_38 = lean_ctor_get(x_32, 1);
|
||||
lean_inc(x_38);
|
||||
lean_inc(x_37);
|
||||
lean_dec(x_32);
|
||||
x_39 = lean_alloc_closure((void*)(l_Lean_PrettyPrinter_Parenthesizer_parenthesizerForKind), 5, 1);
|
||||
lean_closure_set(x_39, 0, x_1);
|
||||
x_40 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_40, 0, x_39);
|
||||
lean_ctor_set(x_40, 1, x_37);
|
||||
x_41 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_41, 0, x_40);
|
||||
lean_ctor_set(x_41, 1, x_38);
|
||||
return x_41;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_40;
|
||||
uint8_t x_42;
|
||||
lean_dec(x_1);
|
||||
x_40 = !lean_is_exclusive(x_30);
|
||||
if (x_40 == 0)
|
||||
x_42 = !lean_is_exclusive(x_32);
|
||||
if (x_42 == 0)
|
||||
{
|
||||
return x_30;
|
||||
return x_32;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_41; lean_object* x_42; lean_object* x_43;
|
||||
x_41 = lean_ctor_get(x_30, 0);
|
||||
x_42 = lean_ctor_get(x_30, 1);
|
||||
lean_inc(x_42);
|
||||
lean_inc(x_41);
|
||||
lean_object* x_43; lean_object* x_44; lean_object* x_45;
|
||||
x_43 = lean_ctor_get(x_32, 0);
|
||||
x_44 = lean_ctor_get(x_32, 1);
|
||||
lean_inc(x_44);
|
||||
lean_inc(x_43);
|
||||
lean_dec(x_32);
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_46; lean_object* x_47; lean_object* x_48;
|
||||
lean_dec(x_1);
|
||||
x_46 = lean_ctor_get(x_30, 0);
|
||||
lean_inc(x_46);
|
||||
lean_dec(x_30);
|
||||
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;
|
||||
}
|
||||
x_47 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_47, 0, x_46);
|
||||
lean_ctor_set(x_47, 1, x_3);
|
||||
x_48 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_48, 0, x_47);
|
||||
lean_ctor_set(x_48, 1, x_4);
|
||||
return x_48;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_44; lean_object* x_45;
|
||||
lean_object* x_49; lean_object* x_50;
|
||||
lean_dec(x_15);
|
||||
lean_dec(x_2);
|
||||
x_44 = 0;
|
||||
x_49 = l_Lean_PrettyPrinter_parenthesizerAttribute;
|
||||
x_50 = l_Lean_KeyedDeclsAttribute_getValues___rarg(x_49, x_3, x_1);
|
||||
if (lean_obj_tag(x_50) == 0)
|
||||
{
|
||||
uint8_t x_51; lean_object* x_52;
|
||||
x_51 = 0;
|
||||
lean_inc(x_1);
|
||||
x_45 = l_Lean_PrettyPrinter_Parenthesizer_compile(x_3, x_1, x_44, x_4);
|
||||
if (lean_obj_tag(x_45) == 0)
|
||||
x_52 = l_Lean_PrettyPrinter_Parenthesizer_compile(x_3, x_1, x_51, x_4);
|
||||
if (lean_obj_tag(x_52) == 0)
|
||||
{
|
||||
uint8_t x_46;
|
||||
x_46 = !lean_is_exclusive(x_45);
|
||||
if (x_46 == 0)
|
||||
uint8_t x_53;
|
||||
x_53 = !lean_is_exclusive(x_52);
|
||||
if (x_53 == 0)
|
||||
{
|
||||
lean_object* x_47; lean_object* x_48; lean_object* x_49;
|
||||
x_47 = lean_ctor_get(x_45, 0);
|
||||
x_48 = lean_alloc_closure((void*)(l_Lean_PrettyPrinter_Parenthesizer_parenthesizerForKind), 5, 1);
|
||||
lean_closure_set(x_48, 0, x_1);
|
||||
x_49 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_49, 0, x_48);
|
||||
lean_ctor_set(x_49, 1, x_47);
|
||||
lean_ctor_set(x_45, 0, x_49);
|
||||
return x_45;
|
||||
lean_object* x_54; lean_object* x_55; lean_object* x_56;
|
||||
x_54 = lean_ctor_get(x_52, 0);
|
||||
x_55 = lean_alloc_closure((void*)(l_Lean_PrettyPrinter_Parenthesizer_parenthesizerForKind), 5, 1);
|
||||
lean_closure_set(x_55, 0, x_1);
|
||||
x_56 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_56, 0, x_55);
|
||||
lean_ctor_set(x_56, 1, x_54);
|
||||
lean_ctor_set(x_52, 0, x_56);
|
||||
return x_52;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54;
|
||||
x_50 = lean_ctor_get(x_45, 0);
|
||||
x_51 = lean_ctor_get(x_45, 1);
|
||||
lean_inc(x_51);
|
||||
lean_inc(x_50);
|
||||
lean_dec(x_45);
|
||||
x_52 = lean_alloc_closure((void*)(l_Lean_PrettyPrinter_Parenthesizer_parenthesizerForKind), 5, 1);
|
||||
lean_closure_set(x_52, 0, x_1);
|
||||
x_53 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_53, 0, x_52);
|
||||
lean_ctor_set(x_53, 1, x_50);
|
||||
x_54 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_54, 0, x_53);
|
||||
lean_ctor_set(x_54, 1, x_51);
|
||||
return x_54;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_55;
|
||||
lean_dec(x_1);
|
||||
x_55 = !lean_is_exclusive(x_45);
|
||||
if (x_55 == 0)
|
||||
{
|
||||
return x_45;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_56; lean_object* x_57; lean_object* x_58;
|
||||
x_56 = lean_ctor_get(x_45, 0);
|
||||
x_57 = lean_ctor_get(x_45, 1);
|
||||
lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61;
|
||||
x_57 = lean_ctor_get(x_52, 0);
|
||||
x_58 = lean_ctor_get(x_52, 1);
|
||||
lean_inc(x_58);
|
||||
lean_inc(x_57);
|
||||
lean_inc(x_56);
|
||||
lean_dec(x_45);
|
||||
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;
|
||||
lean_dec(x_52);
|
||||
x_59 = lean_alloc_closure((void*)(l_Lean_PrettyPrinter_Parenthesizer_parenthesizerForKind), 5, 1);
|
||||
lean_closure_set(x_59, 0, x_1);
|
||||
x_60 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_60, 0, x_59);
|
||||
lean_ctor_set(x_60, 1, x_57);
|
||||
x_61 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_61, 0, x_60);
|
||||
lean_ctor_set(x_61, 1, x_58);
|
||||
return x_61;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_62;
|
||||
lean_dec(x_1);
|
||||
x_62 = !lean_is_exclusive(x_52);
|
||||
if (x_62 == 0)
|
||||
{
|
||||
return x_52;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_63; lean_object* x_64; lean_object* x_65;
|
||||
x_63 = lean_ctor_get(x_52, 0);
|
||||
x_64 = lean_ctor_get(x_52, 1);
|
||||
lean_inc(x_64);
|
||||
lean_inc(x_63);
|
||||
lean_dec(x_52);
|
||||
x_65 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_65, 0, x_63);
|
||||
lean_ctor_set(x_65, 1, x_64);
|
||||
return x_65;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_66; lean_object* x_67; lean_object* x_68;
|
||||
lean_dec(x_1);
|
||||
x_66 = lean_ctor_get(x_50, 0);
|
||||
lean_inc(x_66);
|
||||
lean_dec(x_50);
|
||||
x_67 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_67, 0, x_66);
|
||||
lean_ctor_set(x_67, 1, x_3);
|
||||
x_68 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_68, 0, x_67);
|
||||
lean_ctor_set(x_68, 1, x_4);
|
||||
return x_68;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -23700,7 +23706,7 @@ x_1 = l_Lean_numLitKind___closed__1;
|
|||
x_2 = l_Lean_PrettyPrinter_Parenthesizer_compileParenthesizerDescr___main___closed__3;
|
||||
x_3 = 1;
|
||||
x_4 = lean_box(x_3);
|
||||
x_5 = lean_alloc_closure((void*)(l_Lean_PrettyPrinter_Parenthesizer_mkAntiquot_parenthesizer_x27___boxed), 4, 3);
|
||||
x_5 = lean_alloc_closure((void*)(l_Lean_PrettyPrinter_Parenthesizer_mkAntiquot_parenthesizer_x27___boxed), 7, 3);
|
||||
lean_closure_set(x_5, 0, x_1);
|
||||
lean_closure_set(x_5, 1, x_2);
|
||||
lean_closure_set(x_5, 2, x_4);
|
||||
|
|
@ -23745,7 +23751,7 @@ x_1 = l_Lean_strLitKind___closed__1;
|
|||
x_2 = l_Lean_PrettyPrinter_Parenthesizer_compileParenthesizerDescr___main___closed__7;
|
||||
x_3 = 1;
|
||||
x_4 = lean_box(x_3);
|
||||
x_5 = lean_alloc_closure((void*)(l_Lean_PrettyPrinter_Parenthesizer_mkAntiquot_parenthesizer_x27___boxed), 4, 3);
|
||||
x_5 = lean_alloc_closure((void*)(l_Lean_PrettyPrinter_Parenthesizer_mkAntiquot_parenthesizer_x27___boxed), 7, 3);
|
||||
lean_closure_set(x_5, 0, x_1);
|
||||
lean_closure_set(x_5, 1, x_2);
|
||||
lean_closure_set(x_5, 2, x_4);
|
||||
|
|
@ -23790,7 +23796,7 @@ x_1 = l_Lean_charLitKind___closed__1;
|
|||
x_2 = l_Lean_PrettyPrinter_Parenthesizer_compileParenthesizerDescr___main___closed__11;
|
||||
x_3 = 1;
|
||||
x_4 = lean_box(x_3);
|
||||
x_5 = lean_alloc_closure((void*)(l_Lean_PrettyPrinter_Parenthesizer_mkAntiquot_parenthesizer_x27___boxed), 4, 3);
|
||||
x_5 = lean_alloc_closure((void*)(l_Lean_PrettyPrinter_Parenthesizer_mkAntiquot_parenthesizer_x27___boxed), 7, 3);
|
||||
lean_closure_set(x_5, 0, x_1);
|
||||
lean_closure_set(x_5, 1, x_2);
|
||||
lean_closure_set(x_5, 2, x_4);
|
||||
|
|
@ -23835,7 +23841,7 @@ x_1 = l_Lean_nameLitKind___closed__1;
|
|||
x_2 = l_Lean_PrettyPrinter_Parenthesizer_compileParenthesizerDescr___main___closed__15;
|
||||
x_3 = 1;
|
||||
x_4 = lean_box(x_3);
|
||||
x_5 = lean_alloc_closure((void*)(l_Lean_PrettyPrinter_Parenthesizer_mkAntiquot_parenthesizer_x27___boxed), 4, 3);
|
||||
x_5 = lean_alloc_closure((void*)(l_Lean_PrettyPrinter_Parenthesizer_mkAntiquot_parenthesizer_x27___boxed), 7, 3);
|
||||
lean_closure_set(x_5, 0, x_1);
|
||||
lean_closure_set(x_5, 1, x_2);
|
||||
lean_closure_set(x_5, 2, x_4);
|
||||
|
|
@ -23880,7 +23886,7 @@ x_1 = l_Lean_identKind___closed__1;
|
|||
x_2 = l_Lean_PrettyPrinter_Parenthesizer_compileParenthesizerDescr___main___closed__19;
|
||||
x_3 = 1;
|
||||
x_4 = lean_box(x_3);
|
||||
x_5 = lean_alloc_closure((void*)(l_Lean_PrettyPrinter_Parenthesizer_mkAntiquot_parenthesizer_x27___boxed), 4, 3);
|
||||
x_5 = lean_alloc_closure((void*)(l_Lean_PrettyPrinter_Parenthesizer_mkAntiquot_parenthesizer_x27___boxed), 7, 3);
|
||||
lean_closure_set(x_5, 0, x_1);
|
||||
lean_closure_set(x_5, 1, x_2);
|
||||
lean_closure_set(x_5, 2, x_4);
|
||||
|
|
|
|||
|
|
@ -270,7 +270,6 @@ lean_object* x_10; lean_object* x_11; lean_object* x_12;
|
|||
lean_dec(x_1);
|
||||
x_10 = lean_unsigned_to_nat(1u);
|
||||
x_11 = l_String_drop(x_3, x_10);
|
||||
lean_dec(x_3);
|
||||
x_12 = lean_name_mk_string(x_2, x_11);
|
||||
return x_12;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1072,8 +1072,8 @@ if (lean_is_exclusive(x_9)) {
|
|||
}
|
||||
x_13 = l_String_isPrefixOf(x_10, x_5);
|
||||
x_14 = lean_string_length(x_10);
|
||||
lean_inc(x_5);
|
||||
x_15 = l_String_drop(x_5, x_14);
|
||||
lean_dec(x_14);
|
||||
x_16 = lean_unsigned_to_nat(0u);
|
||||
x_17 = lean_string_utf8_get(x_15, x_16);
|
||||
x_18 = l_System_FilePath_pathSeparator;
|
||||
|
|
@ -1215,7 +1215,6 @@ lean_object* x_47; lean_object* x_48; uint32_t x_49; lean_object* x_50;
|
|||
lean_dec(x_10);
|
||||
x_47 = lean_unsigned_to_nat(1u);
|
||||
x_48 = l_String_drop(x_15, x_47);
|
||||
lean_dec(x_15);
|
||||
x_49 = 46;
|
||||
x_50 = l_String_revPosOf(x_48, x_49);
|
||||
if (lean_obj_tag(x_50) == 0)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue