chore: update stage0
This commit is contained in:
parent
f61e4ffbbd
commit
580c0aaf94
21 changed files with 6414 additions and 2982 deletions
|
|
@ -155,7 +155,7 @@ inductive ParserDescr
|
|||
| charLit : ParserDescr
|
||||
| nameLit : ParserDescr
|
||||
| ident : ParserDescr
|
||||
| parser : Name → Nat → ParserDescr
|
||||
| cat : Name → Nat → ParserDescr
|
||||
|
||||
instance ParserDescr.inhabited : Inhabited ParserDescr := ⟨ParserDescr.symbol ""⟩
|
||||
abbrev TrailingParserDescr := ParserDescr
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ Authors: Luke Nelson, Jared Roesch, Leonardo de Moura, Sebastian Ullrich
|
|||
-/
|
||||
prelude
|
||||
import Init.Control.EState
|
||||
import Init.Control.Reader
|
||||
import Init.Data.String.Basic
|
||||
import Init.Data.ByteArray
|
||||
import Init.System.IOError
|
||||
|
|
@ -67,7 +68,15 @@ constant allocprof {α : Type} (msg : @& String) (fn : IO α) : IO α := arbitra
|
|||
@[extern "lean_io_initializing"]
|
||||
constant IO.initializing : IO Bool := arbitrary _
|
||||
|
||||
abbrev MonadIO (m : Type → Type) := HasMonadLiftT IO m
|
||||
class MonadIO (m : Type → Type) extends HasMonadLiftT IO m, MonadExcept IO.Error m
|
||||
|
||||
instance : MonadIO IO := {}
|
||||
|
||||
/- Omitted instances of MonadIO: OptionT, ExceptT and EStateT. The possibility for
|
||||
errors introduces the risk that `withStdout` will not restore the previous handle when
|
||||
an error is returned in the topmost monad. -/
|
||||
instance ReaderT.monadIO {ρ} (m : Type → Type) [Monad m] [MonadIO m] : MonadIO (ReaderT ρ m) := {}
|
||||
instance StateT.monadIO {σ} (m : Type → Type) [Monad m] [MonadIO m] : MonadIO (StateT σ m) := {}
|
||||
|
||||
namespace IO
|
||||
|
||||
|
|
@ -87,6 +96,17 @@ constant FS.Handle : Type := Unit
|
|||
namespace Prim
|
||||
open FS
|
||||
|
||||
@[extern "lean_get_stdin"]
|
||||
constant stdin : IO FS.Handle := arbitrary _
|
||||
@[extern "lean_get_stdout"]
|
||||
constant stdout : IO FS.Handle := arbitrary _
|
||||
@[extern "lean_get_stderr"]
|
||||
constant stderr : IO FS.Handle := arbitrary _
|
||||
|
||||
/-- Run action with `stdin` closed and `stdout+stderr` captured into a `String`. -/
|
||||
@[extern "lean_with_isolated_streams"]
|
||||
constant withIsolatedStreams {α : Type} : IO α → IO (String × Except IO.Error α) := arbitrary _
|
||||
|
||||
@[specialize] partial def iterate {α β : Type} : α → (α → IO (Sum α β)) → IO β
|
||||
| a, f => do
|
||||
v ← f a;
|
||||
|
|
@ -105,8 +125,6 @@ let mode :=
|
|||
let bin := if b then "b" else "t";
|
||||
mode ++ bin
|
||||
|
||||
@[extern "lean_io_prim_put_str"]
|
||||
constant putStr (s: @& String) : IO Unit := arbitrary _
|
||||
@[extern "lean_io_prim_handle_mk"]
|
||||
constant Handle.mk (s : @& String) (mode : @& String) : IO Handle := arbitrary _
|
||||
@[extern "lean_io_prim_handle_is_eof"]
|
||||
|
|
@ -119,11 +137,6 @@ constant Handle.read (h : @& Handle) (bytes : USize) : IO ByteArray := arbitrar
|
|||
@[extern "lean_io_prim_handle_write"]
|
||||
constant Handle.write (h : @& Handle) (buffer : @& ByteArray) : IO Unit := arbitrary _
|
||||
|
||||
@[extern "lean_io_prim_handle_read_byte"]
|
||||
constant Handle.getByte (h : @& Handle) : IO UInt8 := arbitrary _
|
||||
@[extern "lean_io_prim_handle_write_byte"]
|
||||
constant Handle.putByte (h : @& Handle) (c : UInt8) : IO Unit := arbitrary _
|
||||
|
||||
@[extern "lean_io_prim_handle_get_line"]
|
||||
constant Handle.getLine (h : @& Handle) : IO String := arbitrary _
|
||||
@[extern "lean_io_prim_handle_put_str"]
|
||||
|
|
@ -146,27 +159,6 @@ constant currentDir : IO String := arbitrary _
|
|||
monadLift x
|
||||
end Prim
|
||||
|
||||
section
|
||||
variables {m : Type → Type} [Monad m] [MonadIO m]
|
||||
|
||||
private def putStr : String → m Unit :=
|
||||
Prim.liftIO ∘ Prim.putStr
|
||||
|
||||
def print {α} [HasToString α] (s : α) : m Unit := putStr ∘ toString $ s
|
||||
def println {α} [HasToString α] (s : α) : m Unit := print s *> putStr "\n"
|
||||
def getEnv : String → m (Option String) := Prim.liftIO ∘ Prim.getEnv
|
||||
def realPath : String → m String := Prim.liftIO ∘ Prim.realPath
|
||||
def isDir : String → m Bool := Prim.liftIO ∘ Prim.isDir
|
||||
def fileExists : String → m Bool := Prim.liftIO ∘ Prim.fileExists
|
||||
def appPath : m String := Prim.liftIO Prim.appPath
|
||||
def currentDir : m String := Prim.liftIO Prim.currentDir
|
||||
|
||||
def appDir : m String := do
|
||||
p ← appPath;
|
||||
realPath (System.FilePath.dirName p)
|
||||
|
||||
end
|
||||
|
||||
namespace FS
|
||||
variables {m : Type → Type} [Monad m] [MonadIO m]
|
||||
|
||||
|
|
@ -174,8 +166,8 @@ def Handle.mk (s : String) (Mode : Mode) (bin : Bool := false) : m Handle :=
|
|||
Prim.liftIO (Prim.Handle.mk s (Prim.fopenFlags Mode bin))
|
||||
|
||||
@[inline]
|
||||
def withFile {α} (fn : String) (m : Mode) (f : Handle → IO α) : IO α :=
|
||||
Handle.mk fn m >>= f
|
||||
def withFile {α} (fn : String) (mode : Mode) (f : Handle → m α) : m α :=
|
||||
Handle.mk fn mode >>= f
|
||||
|
||||
/-- returns whether the end of the file has been reached while reading a file.
|
||||
`h.isEof` returns true /after/ the first attempt at reading past the end of `h`.
|
||||
|
|
@ -185,8 +177,6 @@ def Handle.isEof : Handle → m Bool := Prim.liftIO ∘ Prim.Handle.isEof
|
|||
def Handle.flush : Handle → m Unit := Prim.liftIO ∘ Prim.Handle.flush
|
||||
def Handle.read (h : Handle) (bytes : Nat) : m ByteArray := Prim.liftIO (Prim.Handle.read h (USize.ofNat bytes))
|
||||
def Handle.write (h : Handle) (s : ByteArray) : m Unit := Prim.liftIO (Prim.Handle.write h s)
|
||||
def Handle.getByte (h : Handle) : m UInt8 := Prim.liftIO (Prim.Handle.getByte h)
|
||||
def Handle.putByte (h : Handle) (b : UInt8) : m Unit := Prim.liftIO (Prim.Handle.putByte h b)
|
||||
|
||||
def Handle.getLine : Handle → m String := Prim.liftIO ∘ Prim.Handle.getLine
|
||||
|
||||
|
|
@ -230,9 +220,37 @@ linesAux h #[]
|
|||
|
||||
end FS
|
||||
|
||||
-- constant stdin : IO FS.Handle
|
||||
-- constant stderr : IO FS.Handle
|
||||
-- constant stdout : IO FS.Handle
|
||||
section
|
||||
variables {m : Type → Type} [Monad m] [MonadIO m]
|
||||
|
||||
def stdin : m FS.Handle :=
|
||||
Prim.liftIO Prim.stdin
|
||||
|
||||
def stdout : m FS.Handle :=
|
||||
Prim.liftIO Prim.stdout
|
||||
|
||||
def stderr : m FS.Handle :=
|
||||
Prim.liftIO Prim.stderr
|
||||
|
||||
private def putStr (s : String) : m Unit := do
|
||||
out ← stdout;
|
||||
out.putStr s
|
||||
|
||||
def print {α} [HasToString α] (s : α) : m Unit := putStr ∘ toString $ s
|
||||
def println {α} [HasToString α] (s : α) : m Unit := print s *> putStr "\n"
|
||||
def getEnv : String → m (Option String) := Prim.liftIO ∘ Prim.getEnv
|
||||
def realPath : String → m String := Prim.liftIO ∘ Prim.realPath
|
||||
def isDir : String → m Bool := Prim.liftIO ∘ Prim.isDir
|
||||
def fileExists : String → m Bool := Prim.liftIO ∘ Prim.fileExists
|
||||
def appPath : m String := Prim.liftIO Prim.appPath
|
||||
|
||||
def appDir : m String := do
|
||||
p ← appPath;
|
||||
realPath (System.FilePath.dirName p)
|
||||
|
||||
def currentDir : m String := Prim.liftIO Prim.currentDir
|
||||
|
||||
end
|
||||
|
||||
/-
|
||||
namespace Proc
|
||||
|
|
|
|||
|
|
@ -534,6 +534,58 @@ when succeeded $
|
|||
@[builtinCommandElab «check_failure»] def elabCheckFailure : CommandElab :=
|
||||
fun stx => failIfSucceeds stx $ elabCheck stx
|
||||
|
||||
def addDecl (ref : Syntax) (decl : Declaration) : CommandElabM Unit := liftTermElabM none $ Term.addDecl ref decl
|
||||
def compileDecl (ref : Syntax) (decl : Declaration) : CommandElabM Unit := liftTermElabM none $ Term.compileDecl ref decl
|
||||
|
||||
unsafe def elabEvalUnsafe : CommandElab :=
|
||||
fun stx => withoutModifyingEnv do
|
||||
let ref := stx;
|
||||
let term := stx.getArg 1;
|
||||
let n := `_eval;
|
||||
ctx ← read;
|
||||
env ← getEnv;
|
||||
let addAndCompile := fun value => do {
|
||||
type ← Term.inferType ref value;
|
||||
let decl := Declaration.defnDecl { name := n, lparams := [], type := type,
|
||||
value := value, hints := ReducibilityHints.opaque, isUnsafe := true };
|
||||
Term.addDecl ref decl;
|
||||
Term.compileDecl ref decl
|
||||
};
|
||||
act ← runTermElabM (some n) fun _ => do {
|
||||
e ← Term.elabTerm term none;
|
||||
Term.synthesizeSyntheticMVars false;
|
||||
if env.contains `Lean.MetaHasEval then do
|
||||
-- modify `e` to `fun env opts => MetaHasEval.eval (hideUnit := false) env opts e`
|
||||
e ← Term.withLocalDecl ref `env BinderInfo.default (mkConst `Lean.Environment) fun env =>
|
||||
Term.withLocalDecl ref `opts BinderInfo.default (mkConst `Lean.Options) fun opts => do {
|
||||
e ← Term.mkAppM ref `Lean.MetaHasEval.eval #[env, opts, e, toExpr false];
|
||||
Term.mkLambda ref #[env, opts] e
|
||||
};
|
||||
addAndCompile e;
|
||||
env ← Term.getEnv;
|
||||
opts ← Term.getOptions;
|
||||
match env.evalConst (Environment → Options → IO Unit) n with
|
||||
| Except.error e => Term.throwError ref e
|
||||
| Except.ok act => pure $ act env opts
|
||||
else do
|
||||
-- fall back to non-meta eval if MetaHasEval hasn't been defined yet
|
||||
-- modify e to `HasEval.eval (hideUnit := false) e`
|
||||
e ← Term.mkAppM ref `Lean.HasEval.eval #[e, toExpr false];
|
||||
addAndCompile e;
|
||||
env ← Term.getEnv;
|
||||
match env.evalConst (IO Unit) n with
|
||||
| Except.error e => Term.throwError ref e
|
||||
| Except.ok act => pure act
|
||||
};
|
||||
(out, res) ← liftIO ref $ IO.Prim.withIsolatedStreams act;
|
||||
logInfo ref out;
|
||||
match res with
|
||||
| Except.error e => throw $ Exception.error $ ioErrorToMessage ctx ref e
|
||||
| Except.ok _ => pure ()
|
||||
|
||||
@[builtinCommandElab «eval», implementedBy elabEvalUnsafe]
|
||||
constant elabEval : CommandElab := arbitrary _
|
||||
|
||||
@[builtinCommandElab «synth»] def elabSynth : CommandElab :=
|
||||
fun stx => do
|
||||
let ref := stx;
|
||||
|
|
@ -628,9 +680,6 @@ let remaining := usedParams.filter (fun levelParam => !explicitParams.elem level
|
|||
let remaining := remaining.qsort Name.lt;
|
||||
result ++ remaining.toList
|
||||
|
||||
def addDecl (ref : Syntax) (decl : Declaration) : CommandElabM Unit := liftTermElabM none $ Term.addDecl ref decl
|
||||
def compileDecl (ref : Syntax) (decl : Declaration) : CommandElabM Unit := liftTermElabM none $ Term.compileDecl ref decl
|
||||
|
||||
end Command
|
||||
end Elab
|
||||
end Lean
|
||||
|
|
|
|||
|
|
@ -64,6 +64,8 @@ env ← getEnv;
|
|||
unless (isAttribute env attrName) $
|
||||
throwError stx ("unknown attribute [" ++ attrName ++ "]");
|
||||
let args := stx.getArg 1;
|
||||
-- the old frontend passes Syntax.missing for empty args, for reasons
|
||||
let args := if args.getNumArgs == 0 then Syntax.missing else args;
|
||||
pure { name := attrName, args := args }
|
||||
|
||||
def elabAttrs (stx : Syntax) : CommandElabM (Array Attribute) :=
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ partial def toParserDescrAux : Syntax → ToParserDescrM Syntax
|
|||
env ← liftM getEnv;
|
||||
unless (Parser.isParserCategory env cat) $ liftM $ throwError (stx.getArg 3) ("unknown category '" ++ cat ++ "'");
|
||||
let prec := prec?.getD 0;
|
||||
`(ParserDescr.parser $(quote cat) $(quote prec))
|
||||
`(ParserDescr.cat $(quote cat) $(quote prec))
|
||||
else if kind == `Lean.Parser.Syntax.atom then do
|
||||
match (stx.getArg 0).isStrLit? with
|
||||
| some atom => do
|
||||
|
|
@ -154,13 +154,24 @@ end Term
|
|||
|
||||
namespace Command
|
||||
|
||||
private def getCatSuffix (catName : Name) : String :=
|
||||
match catName with
|
||||
| Name.str _ s _ => s
|
||||
| _ => unreachable!
|
||||
|
||||
private def declareSyntaxCatQuotParser (catName : Name) : CommandElabM Unit := do
|
||||
let quotSymbol := "`(" ++ getCatSuffix catName ++ "|";
|
||||
cmd ← `(@[termParser] def catStxQuot : Lean.ParserDescr := Lean.ParserDescr.node `Lean.Parser.Term.stxQuot $(quote Lean.Parser.maxPrec) (Lean.ParserDescr.andthen (Lean.ParserDescr.symbol $(quote quotSymbol)) (Lean.ParserDescr.andthen (Lean.ParserDescr.cat $(quote catName) 0) (Lean.ParserDescr.symbol ")"))));
|
||||
elabCommand cmd
|
||||
|
||||
@[builtinCommandElab syntaxCat] def elabDeclareSyntaxCat : CommandElab :=
|
||||
fun stx => do
|
||||
let catName := stx.getIdAt 1;
|
||||
let attrName := catName.appendAfter "Parser";
|
||||
env ← getEnv;
|
||||
env ← liftIO stx $ Parser.registerParserCategory env attrName catName;
|
||||
setEnv env
|
||||
setEnv env;
|
||||
declareSyntaxCatQuotParser catName
|
||||
|
||||
def mkKindName (catName : Name) : Name :=
|
||||
`_kind ++ catName
|
||||
|
|
|
|||
|
|
@ -32,7 +32,6 @@ ctx ← read; pure ctx.2
|
|||
instance MetaIO.metaHasEval {α} [MetaHasEval α] : MetaHasEval (MetaIO α) :=
|
||||
⟨fun env opts x _ => x (env, opts) >>= MetaHasEval.eval env opts⟩
|
||||
|
||||
instance MetaIO.monadIO : MonadIO MetaIO :=
|
||||
⟨fun _ x _ => x⟩
|
||||
instance MetaIO.monadIO : MonadIO MetaIO := {}
|
||||
|
||||
end Lean
|
||||
|
|
|
|||
|
|
@ -1772,7 +1772,7 @@ def compileParserDescr (categories : ParserCategories) : ParserDescr → Except
|
|||
| ParserDescr.nameLit => pure $ nameLit
|
||||
| ParserDescr.ident => pure $ ident
|
||||
| ParserDescr.nonReservedSymbol tk includeIdent => pure $ nonReservedSymbol tk includeIdent
|
||||
| ParserDescr.parser catName prec =>
|
||||
| ParserDescr.cat catName prec =>
|
||||
match categories.find? catName with
|
||||
| some _ => pure $ categoryParser catName prec
|
||||
| none => throwUnknownParserCategory catName
|
||||
|
|
|
|||
|
|
@ -70,8 +70,8 @@ def macroArgType := nonReservedSymbol "ident" <|> nonReservedSymbol "num" <|>
|
|||
def macroArgSimple := parser! ident >> checkNoWsBefore "no space before ':'" >> ":" >> macroArgType
|
||||
def macroArg := try strLit <|> try macroArgSimple
|
||||
def macroHead := macroArg <|> try ident
|
||||
def macroTailTactic : Parser := try (" : " >> identEq "tactic") >> darrow >> "`(" >> sepBy1 tacticParser "; " true true >> ")"
|
||||
def macroTailCommand : Parser := try (" : " >> identEq "command") >> darrow >> "`(" >> many1 commandParser true >> ")"
|
||||
def macroTailTactic : Parser := try (" : " >> identEq "tactic") >> darrow >> ("`(" >> sepBy1 tacticParser "; " true true >> ")" <|> termParser)
|
||||
def macroTailCommand : Parser := try (" : " >> identEq "command") >> darrow >> ("`(" >> many1 commandParser true >> ")" <|> termParser)
|
||||
def macroTailDefault : Parser := try (" : " >> ident) >> darrow >> (("`(" >> categoryParserOfStack 2 >> ")") <|> termParser)
|
||||
def macroTail := macroTailTactic <|> macroTailCommand <|> macroTailDefault
|
||||
@[builtinCommandParser] def «macro» := parser! "macro " >> optPrecedence >> macroHead >> many macroArg >> macroTail
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ Author: Leonardo de Moura
|
|||
#include <algorithm>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <unistd.h>
|
||||
#include <lean/sstream.h>
|
||||
#include <lean/compact.h>
|
||||
#include "util/timeit.h"
|
||||
|
|
@ -330,6 +331,8 @@ environment hide_cmd(parser & p) {
|
|||
return new_env;
|
||||
}
|
||||
|
||||
void with_isolated_streams(std::string & streams_out, std::function<void()> fn);
|
||||
|
||||
static environment eval_cmd(parser & p) {
|
||||
transient_cmd_scope cmd_scope(p);
|
||||
auto pos = p.pos();
|
||||
|
|
@ -382,26 +385,24 @@ static environment eval_cmd(parser & p) {
|
|||
|
||||
auto out = p.mk_message(p.cmd_pos(), p.pos(), INFORMATION);
|
||||
out.set_caption("eval result");
|
||||
scope_traces_as_messages scope_traces(p.get_stream_name(), p.cmd_pos());
|
||||
std::streambuf * saved_cout = std::cout.rdbuf(out.get_text_stream().get_stream().rdbuf());
|
||||
std::streambuf * saved_cerr = std::cerr.rdbuf(out.get_text_stream().get_stream().rdbuf());
|
||||
|
||||
std::string streams_out;
|
||||
object_ref r;
|
||||
|
||||
try {
|
||||
time_task t("#eval execution",
|
||||
message_builder(environment(), get_global_ios(), "foo", pos_info(), message_severity::INFORMATION));
|
||||
r = object_ref(ir::run_boxed(new_env, fn_name, args.size(), &args[0]));
|
||||
} catch (exception & ex) {
|
||||
std::cout.rdbuf(saved_cout);
|
||||
std::cerr.rdbuf(saved_cerr);
|
||||
with_isolated_streams(streams_out, [&]() {
|
||||
scope_traces_as_messages scope_traces(p.get_stream_name(), p.cmd_pos());
|
||||
time_task t("#eval execution",
|
||||
message_builder(environment(), get_global_ios(), "foo", pos_info(), message_severity::INFORMATION));
|
||||
r = object_ref(ir::run_boxed(new_env, fn_name, args.size(), &args[0]));
|
||||
});
|
||||
} catch (exception &) {
|
||||
out << streams_out;
|
||||
out.report();
|
||||
throw ex;
|
||||
throw;
|
||||
}
|
||||
|
||||
std::cout.rdbuf(saved_cout);
|
||||
std::cerr.rdbuf(saved_cerr);
|
||||
out << streams_out;
|
||||
out.report();
|
||||
|
||||
if (io_result_is_error(r.raw())) {
|
||||
message_builder msg = p.mk_message(p.cmd_pos(), p.pos(), ERROR);
|
||||
object * err = io_result_get_error(r.raw());
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@ Author: Leonardo de Moura
|
|||
#else
|
||||
// Linux include files
|
||||
#include <unistd.h> // NOLINT
|
||||
#include <sys/mman.h>
|
||||
#include <fcntl.h>
|
||||
#endif
|
||||
#include <iostream>
|
||||
#include <chrono>
|
||||
|
|
@ -109,11 +111,6 @@ extern "C" obj_res lean_io_initializing(obj_arg) {
|
|||
return set_io_result(box(g_initializing));
|
||||
}
|
||||
|
||||
extern "C" obj_res lean_io_prim_put_str(b_obj_arg s, obj_arg) {
|
||||
std::cout << string_to_std(s); // TODO(Leo): use out handle
|
||||
return set_io_result(box(0));
|
||||
}
|
||||
|
||||
static lean_external_class * g_io_handle_external_class = nullptr;
|
||||
|
||||
static void io_handle_finalizer(void * h) {
|
||||
|
|
@ -127,10 +124,108 @@ static lean_object * io_wrap_handle(FILE *hfile) {
|
|||
return lean_alloc_external(g_io_handle_external_class, hfile);
|
||||
}
|
||||
|
||||
static object * g_handle_stdin = nullptr;
|
||||
static object * g_handle_stdout = nullptr;
|
||||
static object * g_handle_stderr = nullptr;
|
||||
|
||||
/* stdin : IO FS.Handle */
|
||||
extern "C" obj_res lean_get_stdin(obj_arg /* w */) {
|
||||
inc_ref(g_handle_stdin);
|
||||
return set_io_result(g_handle_stdin);
|
||||
}
|
||||
|
||||
/* stdout : IO FS.Handle */
|
||||
extern "C" obj_res lean_get_stdout(obj_arg /* w */) {
|
||||
inc_ref(g_handle_stdout);
|
||||
return set_io_result(g_handle_stdout);
|
||||
}
|
||||
|
||||
/* stderr : IO FS.Handle */
|
||||
extern "C" obj_res lean_get_stderr(obj_arg /* w */) {
|
||||
inc_ref(g_handle_stderr);
|
||||
return set_io_result(g_handle_stderr);
|
||||
}
|
||||
|
||||
static FILE * io_get_handle(lean_object * hfile) {
|
||||
return static_cast<FILE *>(lean_get_external_data(hfile));
|
||||
}
|
||||
|
||||
void with_isolated_streams(std::string & streams_out, std::function<void()> fn) {
|
||||
// When running `#eval`, we want to temporarily close stdin and capture stdout/stderr of the evaluated program
|
||||
// so it doesn't interfere with the server I/O. We could do this on the Lean API level (i.e. `IO.getLine/putStr`),
|
||||
// but that wouldn't affect direct access to `IO.stdin/...` nor FFI-called code. Instead, we directly work on file
|
||||
// descriptors.
|
||||
// Create a fresh file descriptor we can point stdout/stderr to
|
||||
#if defined(__linux__)
|
||||
// On Linux, we can simply open an anonymous file in memory
|
||||
int buf_fd = memfd_create("lean-eval", 0);
|
||||
#elif 0
|
||||
// On macOS, we can open exclusive shared memory object, guessing a hopefully unique name
|
||||
// ...or at least we should be able to, but it doesn't work for some reason.
|
||||
// NOTE: what doesn't work: `funopen` returns a `FILE *` stream without a file descriptor
|
||||
std::string shm_name = (sstream() << "lean-eval-" << getpid()).str();
|
||||
int buf_fd = shm_open(shm_name.c_str(), O_RDWR | O_CREAT | O_EXCL, S_IRWXU);
|
||||
lean_always_assert(shm_unlink(shm_name.c_str()) == 0);
|
||||
#else
|
||||
// On Windows we can open an actual file I guess
|
||||
FILE * buf_f = tmpfile(); lean_always_assert(buf_f != nullptr);
|
||||
int buf_fd = fileno(buf_f);
|
||||
#endif
|
||||
lean_always_assert(buf_fd >= 0);
|
||||
// NOTE: what doesn't work: `pipe` creates file descriptors, but we would need a separate consumer thread so
|
||||
// the evaluated program doesn't block on a full pipe
|
||||
|
||||
// make sure to drain user-level buffers
|
||||
fflush(stdout); fflush(stderr);
|
||||
// copy stdout/stderr, then set them to `buf_fd`
|
||||
#ifdef __linux__
|
||||
// On Linux, we also redirect stdin so it appears as empty. This doesn't seem to work on other platforms.
|
||||
// NOTE: Since we can't flush stdin, this only really works if we are on a line ending (assuming stdin is line buffered).
|
||||
// This should be the case for the server, which is line-based.
|
||||
int old_stdin = dup(STDIN_FILENO); lean_always_assert(old_stdin >= 0); lean_always_assert(dup2(buf_fd, STDIN_FILENO) >= 0);
|
||||
#endif
|
||||
int old_stdout = dup(STDOUT_FILENO); lean_always_assert(old_stdout >= 0); lean_always_assert(dup2(buf_fd, STDOUT_FILENO) >= 0);
|
||||
int old_stderr = dup(STDERR_FILENO); lean_always_assert(old_stderr >= 0); lean_always_assert(dup2(buf_fd, STDERR_FILENO) >= 0);
|
||||
|
||||
std::function<void()> finally = [&]() {
|
||||
fflush(stdout); fflush(stderr);
|
||||
// restore old streams
|
||||
#ifdef __linux__
|
||||
lean_always_assert(dup2(old_stdin, STDIN_FILENO) >= 0); lean_always_assert(close(old_stdin) == 0);
|
||||
#endif
|
||||
lean_always_assert(dup2(old_stdout, STDOUT_FILENO) >= 0); lean_always_assert(close(old_stdout) == 0);
|
||||
lean_always_assert(dup2(old_stderr, STDERR_FILENO) >= 0); lean_always_assert(close(old_stderr) == 0);
|
||||
// write `buf_fd` contents to `out`
|
||||
off_t buf_sz = lseek(buf_fd, 0, SEEK_CUR);
|
||||
lseek(buf_fd, 0, SEEK_SET);
|
||||
std::string buf_s(buf_sz, '\0');
|
||||
lean_always_assert(read(buf_fd, static_cast<void *>(&buf_s[0]), buf_sz) == buf_sz);
|
||||
lean_always_assert(close(buf_fd) == 0);
|
||||
streams_out = buf_s;
|
||||
};
|
||||
|
||||
try {
|
||||
fn();
|
||||
} catch (exception &) {
|
||||
finally();
|
||||
throw;
|
||||
}
|
||||
|
||||
finally();
|
||||
}
|
||||
|
||||
/* withIsolatedStreams {α : Type} : IO α → IO (String × Except IO.Error α) */
|
||||
extern "C" obj_res lean_with_isolated_streams(obj_arg act, obj_arg w) {
|
||||
std::string streams_out;
|
||||
object_ref act_res;
|
||||
with_isolated_streams(streams_out, [&]() { act_res = object_ref(apply_1(act, w)); });
|
||||
if (io_result_is_ok(act_res.raw())) {
|
||||
return set_io_result(mk_cnstr(0, mk_string(streams_out), mk_except_ok(object_ref(io_result_get_value(act_res.raw()), true))).steal());
|
||||
} else {
|
||||
return set_io_result(mk_cnstr(0, mk_string(streams_out), mk_except_error(object_ref(io_result_get_error(act_res.raw()), true))).steal());
|
||||
}
|
||||
}
|
||||
|
||||
obj_res decode_io_error(int errnum, b_obj_arg fname) {
|
||||
object * details = mk_string(strerror(errnum));
|
||||
switch (errnum) {
|
||||
|
|
@ -258,27 +353,6 @@ extern "C" obj_res lean_io_prim_handle_flush(b_obj_arg h, obj_arg /* w */) {
|
|||
}
|
||||
}
|
||||
|
||||
/* Handle.readByte : (@& Handle) → IO UInt8 */
|
||||
extern "C" obj_res lean_io_prim_handle_read_byte(b_obj_arg h, obj_arg /* w */) {
|
||||
FILE * fp = io_get_handle(h);
|
||||
int c = std::fgetc(fp);
|
||||
if (c != EOF) {
|
||||
return set_io_result(box(c));
|
||||
} else {
|
||||
return set_io_error(decode_io_error(errno, nullptr));
|
||||
}
|
||||
}
|
||||
|
||||
/* Handle.writeByte : (@& Handle) → UInt8 → IO unit */
|
||||
extern "C" obj_res lean_io_prim_handle_write_byte(b_obj_arg h, uint8 c, obj_arg /* w */) {
|
||||
FILE * fp = io_get_handle(h);
|
||||
if (std::fputc(c, fp) != EOF) {
|
||||
return set_io_result(box(0));
|
||||
} else {
|
||||
return set_io_error(decode_io_error(errno, nullptr));
|
||||
}
|
||||
}
|
||||
|
||||
static object * g_io_error_eof = nullptr;
|
||||
|
||||
/* Handle.read : (@& Handle) → USize → IO ByteArray */
|
||||
|
|
@ -606,6 +680,12 @@ void initialize_io() {
|
|||
g_io_error_eof = lean_mk_io_error_eof(lean_box(0));
|
||||
mark_persistent(g_io_error_eof);
|
||||
g_io_handle_external_class = lean_register_external_class(io_handle_finalizer, io_handle_foreach);
|
||||
g_handle_stdout = io_wrap_handle(stdout);
|
||||
mark_persistent(g_handle_stdout);
|
||||
g_handle_stderr = io_wrap_handle(stderr);
|
||||
mark_persistent(g_handle_stderr);
|
||||
g_handle_stdin = io_wrap_handle(stdin);
|
||||
mark_persistent(g_handle_stdin);
|
||||
}
|
||||
|
||||
void finalize_io() {
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -172,6 +172,7 @@ lean_object* l_Lean_IR_EmitC_main(lean_object*, lean_object*);
|
|||
extern lean_object* l_Char_quoteCore___closed__2;
|
||||
lean_object* l_Lean_IR_EmitC_emit___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
extern lean_object* l_Lean_IR_Arg_Inhabited;
|
||||
extern lean_object* l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
lean_object* l_Lean_IR_EmitC_emitMainFn___closed__4;
|
||||
lean_object* l_Lean_IR_EmitC_emitIf(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_IR_EmitC_emitReset(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -268,7 +269,6 @@ lean_object* l_Lean_IR_EmitC_emitSProj___closed__3;
|
|||
extern lean_object* l_List_reprAux___main___rarg___closed__1;
|
||||
extern lean_object* l_Lean_IR_formatFnBody___main___closed__1;
|
||||
lean_object* l_Lean_IR_EmitC_emitFileHeader___closed__21;
|
||||
extern lean_object* l_IO_println___rarg___closed__1;
|
||||
lean_object* l_Lean_IR_EmitC_toCName(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_IR_EmitC_emitInitFn___closed__7;
|
||||
lean_object* l_Lean_IR_EmitC_emitFullApp___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -731,7 +731,7 @@ lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_obj
|
|||
x_5 = lean_apply_1(x_1, x_2);
|
||||
x_6 = lean_string_append(x_4, x_5);
|
||||
lean_dec(x_5);
|
||||
x_7 = l_IO_println___rarg___closed__1;
|
||||
x_7 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_8 = lean_string_append(x_6, x_7);
|
||||
x_9 = lean_box(0);
|
||||
x_10 = lean_alloc_ctor(0, 2, 0);
|
||||
|
|
@ -782,7 +782,7 @@ lean_inc(x_1);
|
|||
x_9 = lean_apply_1(x_1, x_7);
|
||||
x_10 = lean_string_append(x_4, x_9);
|
||||
lean_dec(x_9);
|
||||
x_11 = l_IO_println___rarg___closed__1;
|
||||
x_11 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_12 = lean_string_append(x_10, x_11);
|
||||
x_2 = x_8;
|
||||
x_4 = x_12;
|
||||
|
|
@ -1903,7 +1903,7 @@ x_33 = l_Option_HasRepr___rarg___closed__3;
|
|||
x_34 = lean_string_append(x_31, x_33);
|
||||
x_35 = l_Lean_IR_formatFnBody___main___closed__1;
|
||||
x_36 = lean_string_append(x_34, x_35);
|
||||
x_37 = l_IO_println___rarg___closed__1;
|
||||
x_37 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_38 = lean_string_append(x_36, x_37);
|
||||
x_39 = lean_box(0);
|
||||
lean_ctor_set(x_29, 1, x_38);
|
||||
|
|
@ -1920,7 +1920,7 @@ x_41 = l_Option_HasRepr___rarg___closed__3;
|
|||
x_42 = lean_string_append(x_40, x_41);
|
||||
x_43 = l_Lean_IR_formatFnBody___main___closed__1;
|
||||
x_44 = lean_string_append(x_42, x_43);
|
||||
x_45 = l_IO_println___rarg___closed__1;
|
||||
x_45 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_46 = lean_string_append(x_44, x_45);
|
||||
x_47 = lean_box(0);
|
||||
x_48 = lean_alloc_ctor(0, 2, 0);
|
||||
|
|
@ -1955,7 +1955,7 @@ x_56 = l_Option_HasRepr___rarg___closed__3;
|
|||
x_57 = lean_string_append(x_54, x_56);
|
||||
x_58 = l_Lean_IR_formatFnBody___main___closed__1;
|
||||
x_59 = lean_string_append(x_57, x_58);
|
||||
x_60 = l_IO_println___rarg___closed__1;
|
||||
x_60 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_61 = lean_string_append(x_59, x_60);
|
||||
x_62 = lean_box(0);
|
||||
lean_ctor_set(x_52, 1, x_61);
|
||||
|
|
@ -1972,7 +1972,7 @@ x_64 = l_Option_HasRepr___rarg___closed__3;
|
|||
x_65 = lean_string_append(x_63, x_64);
|
||||
x_66 = l_Lean_IR_formatFnBody___main___closed__1;
|
||||
x_67 = lean_string_append(x_65, x_66);
|
||||
x_68 = l_IO_println___rarg___closed__1;
|
||||
x_68 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_69 = lean_string_append(x_67, x_68);
|
||||
x_70 = lean_box(0);
|
||||
x_71 = lean_alloc_ctor(0, 2, 0);
|
||||
|
|
@ -1994,7 +1994,7 @@ x_76 = l_Option_HasRepr___rarg___closed__3;
|
|||
x_77 = lean_string_append(x_75, x_76);
|
||||
x_78 = l_Lean_IR_formatFnBody___main___closed__1;
|
||||
x_79 = lean_string_append(x_77, x_78);
|
||||
x_80 = l_IO_println___rarg___closed__1;
|
||||
x_80 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_81 = lean_string_append(x_79, x_80);
|
||||
x_82 = lean_box(0);
|
||||
if (lean_is_scalar(x_10)) {
|
||||
|
|
@ -2016,7 +2016,7 @@ lean_dec(x_8);
|
|||
lean_dec(x_6);
|
||||
x_88 = l_Lean_IR_formatFnBody___main___closed__1;
|
||||
x_89 = lean_string_append(x_21, x_88);
|
||||
x_90 = l_IO_println___rarg___closed__1;
|
||||
x_90 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_91 = lean_string_append(x_89, x_90);
|
||||
x_92 = lean_box(0);
|
||||
if (lean_is_scalar(x_10)) {
|
||||
|
|
@ -2464,7 +2464,7 @@ lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_obj
|
|||
x_6 = lean_ctor_get(x_1, 0);
|
||||
x_7 = lean_ctor_get(x_1, 1);
|
||||
x_8 = lean_string_append(x_3, x_6);
|
||||
x_9 = l_IO_println___rarg___closed__1;
|
||||
x_9 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_10 = lean_string_append(x_8, x_9);
|
||||
x_1 = x_7;
|
||||
x_3 = x_10;
|
||||
|
|
@ -3073,7 +3073,7 @@ if (x_20 == 0)
|
|||
lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94;
|
||||
x_85 = l_Lean_IR_EmitC_emitMainFn___closed__46;
|
||||
x_86 = lean_string_append(x_18, x_85);
|
||||
x_87 = l_IO_println___rarg___closed__1;
|
||||
x_87 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_88 = lean_string_append(x_86, x_87);
|
||||
x_89 = l_Lean_IR_EmitC_emitMainFn___closed__47;
|
||||
x_90 = lean_string_append(x_88, x_89);
|
||||
|
|
@ -3089,7 +3089,7 @@ else
|
|||
lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104;
|
||||
x_95 = l_Lean_IR_EmitC_emitMainFn___closed__49;
|
||||
x_96 = lean_string_append(x_18, x_95);
|
||||
x_97 = l_IO_println___rarg___closed__1;
|
||||
x_97 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_98 = lean_string_append(x_96, x_97);
|
||||
x_99 = l_Lean_IR_EmitC_emitMainFn___closed__47;
|
||||
x_100 = lean_string_append(x_98, x_99);
|
||||
|
|
@ -3118,7 +3118,7 @@ x_29 = l_Lean_IR_EmitC_emitMainFn___closed__3;
|
|||
x_30 = lean_string_append(x_28, x_29);
|
||||
x_31 = lean_string_append(x_24, x_30);
|
||||
lean_dec(x_30);
|
||||
x_32 = l_IO_println___rarg___closed__1;
|
||||
x_32 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_33 = lean_string_append(x_31, x_32);
|
||||
x_34 = l_Lean_IR_EmitC_emitMainFn___closed__11;
|
||||
x_35 = l_List_forM___main___at_Lean_IR_EmitC_emitMainFn___spec__2(x_34, x_1, x_33);
|
||||
|
|
@ -3797,7 +3797,7 @@ x_13 = l_Lean_Environment_imports(x_4);
|
|||
lean_dec(x_4);
|
||||
x_14 = l_Lean_IR_EmitC_emitFileHeader___closed__23;
|
||||
x_15 = lean_string_append(x_8, x_14);
|
||||
x_16 = l_IO_println___rarg___closed__1;
|
||||
x_16 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_17 = lean_string_append(x_15, x_16);
|
||||
x_18 = lean_string_append(x_17, x_12);
|
||||
lean_dec(x_12);
|
||||
|
|
@ -4461,7 +4461,7 @@ x_16 = lean_string_append(x_14, x_15);
|
|||
lean_dec(x_15);
|
||||
x_17 = l_Option_HasRepr___rarg___closed__3;
|
||||
x_18 = lean_string_append(x_16, x_17);
|
||||
x_19 = l_IO_println___rarg___closed__1;
|
||||
x_19 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_20 = lean_string_append(x_18, x_19);
|
||||
lean_inc(x_1);
|
||||
lean_inc(x_7);
|
||||
|
|
@ -4566,7 +4566,7 @@ x_19 = lean_string_append(x_17, x_18);
|
|||
lean_dec(x_18);
|
||||
x_20 = l___private_Init_Util_1__mkPanicMessage___closed__2;
|
||||
x_21 = lean_string_append(x_19, x_20);
|
||||
x_22 = l_IO_println___rarg___closed__1;
|
||||
x_22 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_23 = lean_string_append(x_21, x_22);
|
||||
lean_inc(x_1);
|
||||
lean_inc(x_4);
|
||||
|
|
@ -4615,7 +4615,7 @@ lean_inc(x_31);
|
|||
lean_dec(x_10);
|
||||
x_32 = l_Array_forMAux___main___at_Lean_IR_EmitC_emitCase___spec__1___closed__1;
|
||||
x_33 = lean_string_append(x_5, x_32);
|
||||
x_34 = l_IO_println___rarg___closed__1;
|
||||
x_34 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_35 = lean_string_append(x_33, x_34);
|
||||
lean_inc(x_1);
|
||||
lean_inc(x_4);
|
||||
|
|
@ -4692,7 +4692,7 @@ lean_inc(x_12);
|
|||
lean_dec(x_11);
|
||||
x_13 = l_Lean_IR_EmitC_emitCase___closed__2;
|
||||
x_14 = lean_string_append(x_12, x_13);
|
||||
x_15 = l_IO_println___rarg___closed__1;
|
||||
x_15 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_16 = lean_string_append(x_14, x_15);
|
||||
x_17 = lean_unsigned_to_nat(0u);
|
||||
x_18 = l_Array_forMAux___main___at_Lean_IR_EmitC_emitCase___spec__1(x_1, x_8, x_17, x_5, x_16);
|
||||
|
|
@ -4897,7 +4897,7 @@ x_19 = lean_string_append(x_17, x_18);
|
|||
lean_dec(x_18);
|
||||
x_20 = l_Lean_IR_EmitC_emitInc___closed__1;
|
||||
x_21 = lean_string_append(x_19, x_20);
|
||||
x_22 = l_IO_println___rarg___closed__1;
|
||||
x_22 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_23 = lean_string_append(x_21, x_22);
|
||||
x_24 = lean_box(0);
|
||||
x_25 = lean_alloc_ctor(0, 2, 0);
|
||||
|
|
@ -4911,7 +4911,7 @@ lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean
|
|||
lean_dec(x_2);
|
||||
x_26 = l_Lean_IR_EmitC_emitInc___closed__1;
|
||||
x_27 = lean_string_append(x_15, x_26);
|
||||
x_28 = l_IO_println___rarg___closed__1;
|
||||
x_28 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_29 = lean_string_append(x_27, x_28);
|
||||
x_30 = lean_box(0);
|
||||
x_31 = lean_alloc_ctor(0, 2, 0);
|
||||
|
|
@ -4978,7 +4978,7 @@ x_19 = lean_string_append(x_17, x_18);
|
|||
lean_dec(x_18);
|
||||
x_20 = l_Lean_IR_EmitC_emitInc___closed__1;
|
||||
x_21 = lean_string_append(x_19, x_20);
|
||||
x_22 = l_IO_println___rarg___closed__1;
|
||||
x_22 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_23 = lean_string_append(x_21, x_22);
|
||||
x_24 = lean_box(0);
|
||||
x_25 = lean_alloc_ctor(0, 2, 0);
|
||||
|
|
@ -4992,7 +4992,7 @@ lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean
|
|||
lean_dec(x_2);
|
||||
x_26 = l_Lean_IR_EmitC_emitInc___closed__1;
|
||||
x_27 = lean_string_append(x_15, x_26);
|
||||
x_28 = l_IO_println___rarg___closed__1;
|
||||
x_28 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_29 = lean_string_append(x_27, x_28);
|
||||
x_30 = lean_box(0);
|
||||
x_31 = lean_alloc_ctor(0, 2, 0);
|
||||
|
|
@ -5020,7 +5020,7 @@ x_40 = lean_string_append(x_38, x_39);
|
|||
lean_dec(x_39);
|
||||
x_41 = l_Lean_IR_EmitC_emitInc___closed__1;
|
||||
x_42 = lean_string_append(x_40, x_41);
|
||||
x_43 = l_IO_println___rarg___closed__1;
|
||||
x_43 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_44 = lean_string_append(x_42, x_43);
|
||||
x_45 = lean_box(0);
|
||||
x_46 = lean_alloc_ctor(0, 2, 0);
|
||||
|
|
@ -5034,7 +5034,7 @@ lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean
|
|||
lean_dec(x_2);
|
||||
x_47 = l_Lean_IR_EmitC_emitInc___closed__1;
|
||||
x_48 = lean_string_append(x_36, x_47);
|
||||
x_49 = l_IO_println___rarg___closed__1;
|
||||
x_49 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_50 = lean_string_append(x_48, x_49);
|
||||
x_51 = lean_box(0);
|
||||
x_52 = lean_alloc_ctor(0, 2, 0);
|
||||
|
|
@ -5078,7 +5078,7 @@ x_9 = lean_string_append(x_5, x_8);
|
|||
lean_dec(x_8);
|
||||
x_10 = l_Lean_IR_EmitC_emitInc___closed__1;
|
||||
x_11 = lean_string_append(x_9, x_10);
|
||||
x_12 = l_IO_println___rarg___closed__1;
|
||||
x_12 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_13 = lean_string_append(x_11, x_12);
|
||||
x_14 = lean_box(0);
|
||||
x_15 = lean_alloc_ctor(0, 2, 0);
|
||||
|
|
@ -5123,7 +5123,7 @@ x_14 = lean_string_append(x_12, x_13);
|
|||
lean_dec(x_13);
|
||||
x_15 = l_Lean_IR_EmitC_emitInc___closed__1;
|
||||
x_16 = lean_string_append(x_14, x_15);
|
||||
x_17 = l_IO_println___rarg___closed__1;
|
||||
x_17 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_18 = lean_string_append(x_16, x_17);
|
||||
x_19 = lean_box(0);
|
||||
x_20 = lean_alloc_ctor(0, 2, 0);
|
||||
|
|
@ -5177,7 +5177,7 @@ x_20 = lean_ctor_get(x_17, 0);
|
|||
lean_dec(x_20);
|
||||
x_21 = l_Lean_IR_EmitC_emitInc___closed__1;
|
||||
x_22 = lean_string_append(x_19, x_21);
|
||||
x_23 = l_IO_println___rarg___closed__1;
|
||||
x_23 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_24 = lean_string_append(x_22, x_23);
|
||||
x_25 = lean_box(0);
|
||||
lean_ctor_set(x_17, 1, x_24);
|
||||
|
|
@ -5192,7 +5192,7 @@ lean_inc(x_26);
|
|||
lean_dec(x_17);
|
||||
x_27 = l_Lean_IR_EmitC_emitInc___closed__1;
|
||||
x_28 = lean_string_append(x_26, x_27);
|
||||
x_29 = l_IO_println___rarg___closed__1;
|
||||
x_29 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_30 = lean_string_append(x_28, x_29);
|
||||
x_31 = lean_box(0);
|
||||
x_32 = lean_alloc_ctor(0, 2, 0);
|
||||
|
|
@ -5324,7 +5324,7 @@ x_19 = lean_string_append(x_16, x_18);
|
|||
lean_dec(x_18);
|
||||
x_20 = l_Lean_IR_EmitC_emitInc___closed__1;
|
||||
x_21 = lean_string_append(x_19, x_20);
|
||||
x_22 = l_IO_println___rarg___closed__1;
|
||||
x_22 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_23 = lean_string_append(x_21, x_22);
|
||||
x_24 = lean_box(0);
|
||||
x_25 = lean_alloc_ctor(0, 2, 0);
|
||||
|
|
@ -5478,7 +5478,7 @@ x_24 = lean_string_append(x_21, x_23);
|
|||
lean_dec(x_23);
|
||||
x_25 = l_Lean_IR_EmitC_emitInc___closed__1;
|
||||
x_26 = lean_string_append(x_24, x_25);
|
||||
x_27 = l_IO_println___rarg___closed__1;
|
||||
x_27 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_28 = lean_string_append(x_26, x_27);
|
||||
x_29 = lean_box(0);
|
||||
lean_ctor_set(x_17, 1, x_28);
|
||||
|
|
@ -5499,7 +5499,7 @@ x_34 = lean_string_append(x_31, x_33);
|
|||
lean_dec(x_33);
|
||||
x_35 = l_Lean_IR_EmitC_emitInc___closed__1;
|
||||
x_36 = lean_string_append(x_34, x_35);
|
||||
x_37 = l_IO_println___rarg___closed__1;
|
||||
x_37 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_38 = lean_string_append(x_36, x_37);
|
||||
x_39 = lean_box(0);
|
||||
x_40 = lean_alloc_ctor(0, 2, 0);
|
||||
|
|
@ -5565,7 +5565,7 @@ lean_inc(x_25);
|
|||
lean_dec(x_24);
|
||||
x_26 = l_Lean_IR_formatFnBody___main___closed__1;
|
||||
x_27 = lean_string_append(x_25, x_26);
|
||||
x_28 = l_IO_println___rarg___closed__1;
|
||||
x_28 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_29 = lean_string_append(x_27, x_28);
|
||||
x_4 = x_10;
|
||||
x_6 = x_29;
|
||||
|
|
@ -5653,7 +5653,7 @@ x_22 = lean_string_append(x_18, x_21);
|
|||
lean_dec(x_21);
|
||||
x_23 = l_Lean_IR_formatFnBody___main___closed__1;
|
||||
x_24 = lean_string_append(x_22, x_23);
|
||||
x_25 = l_IO_println___rarg___closed__1;
|
||||
x_25 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_26 = lean_string_append(x_24, x_25);
|
||||
x_27 = lean_box(0);
|
||||
lean_ctor_set(x_13, 1, x_26);
|
||||
|
|
@ -5676,7 +5676,7 @@ x_34 = lean_string_append(x_30, x_33);
|
|||
lean_dec(x_33);
|
||||
x_35 = l_Lean_IR_formatFnBody___main___closed__1;
|
||||
x_36 = lean_string_append(x_34, x_35);
|
||||
x_37 = l_IO_println___rarg___closed__1;
|
||||
x_37 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_38 = lean_string_append(x_36, x_37);
|
||||
x_39 = lean_box(0);
|
||||
x_40 = lean_alloc_ctor(0, 2, 0);
|
||||
|
|
@ -5737,7 +5737,7 @@ x_56 = lean_string_append(x_52, x_55);
|
|||
lean_dec(x_55);
|
||||
x_57 = l_Lean_IR_formatFnBody___main___closed__1;
|
||||
x_58 = lean_string_append(x_56, x_57);
|
||||
x_59 = l_IO_println___rarg___closed__1;
|
||||
x_59 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_60 = lean_string_append(x_58, x_59);
|
||||
x_61 = lean_box(0);
|
||||
if (lean_is_scalar(x_50)) {
|
||||
|
|
@ -6033,7 +6033,7 @@ x_20 = lean_ctor_get(x_17, 0);
|
|||
lean_dec(x_20);
|
||||
x_21 = l_Lean_IR_EmitC_emitInc___closed__1;
|
||||
x_22 = lean_string_append(x_19, x_21);
|
||||
x_23 = l_IO_println___rarg___closed__1;
|
||||
x_23 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_24 = lean_string_append(x_22, x_23);
|
||||
x_25 = lean_box(0);
|
||||
lean_ctor_set(x_17, 1, x_24);
|
||||
|
|
@ -6048,7 +6048,7 @@ lean_inc(x_26);
|
|||
lean_dec(x_17);
|
||||
x_27 = l_Lean_IR_EmitC_emitInc___closed__1;
|
||||
x_28 = lean_string_append(x_26, x_27);
|
||||
x_29 = l_IO_println___rarg___closed__1;
|
||||
x_29 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_30 = lean_string_append(x_28, x_29);
|
||||
x_31 = lean_box(0);
|
||||
x_32 = lean_alloc_ctor(0, 2, 0);
|
||||
|
|
@ -6105,7 +6105,7 @@ lean_inc(x_27);
|
|||
lean_dec(x_26);
|
||||
x_28 = l_Lean_IR_EmitC_emitInc___closed__1;
|
||||
x_29 = lean_string_append(x_27, x_28);
|
||||
x_30 = l_IO_println___rarg___closed__1;
|
||||
x_30 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_31 = lean_string_append(x_29, x_30);
|
||||
x_4 = x_10;
|
||||
x_6 = x_31;
|
||||
|
|
@ -6249,7 +6249,7 @@ x_33 = lean_string_append(x_31, x_32);
|
|||
lean_dec(x_32);
|
||||
x_34 = l_Lean_IR_EmitC_emitInc___closed__1;
|
||||
x_35 = lean_string_append(x_33, x_34);
|
||||
x_36 = l_IO_println___rarg___closed__1;
|
||||
x_36 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_37 = lean_string_append(x_35, x_36);
|
||||
x_38 = lean_box(0);
|
||||
lean_ctor_set(x_9, 1, x_37);
|
||||
|
|
@ -6272,7 +6272,7 @@ x_44 = lean_string_append(x_42, x_43);
|
|||
lean_dec(x_43);
|
||||
x_45 = l_Lean_IR_EmitC_emitInc___closed__1;
|
||||
x_46 = lean_string_append(x_44, x_45);
|
||||
x_47 = l_IO_println___rarg___closed__1;
|
||||
x_47 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_48 = lean_string_append(x_46, x_47);
|
||||
x_49 = lean_box(0);
|
||||
x_50 = lean_alloc_ctor(0, 2, 0);
|
||||
|
|
@ -6334,7 +6334,7 @@ x_21 = lean_string_append(x_19, x_20);
|
|||
lean_dec(x_20);
|
||||
x_22 = l_Lean_IR_EmitC_emitInc___closed__1;
|
||||
x_23 = lean_string_append(x_21, x_22);
|
||||
x_24 = l_IO_println___rarg___closed__1;
|
||||
x_24 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_25 = lean_string_append(x_23, x_24);
|
||||
x_3 = x_9;
|
||||
x_5 = x_25;
|
||||
|
|
@ -6399,7 +6399,7 @@ lean_dec(x_8);
|
|||
x_11 = lean_string_append(x_7, x_10);
|
||||
x_12 = l_Lean_IR_EmitC_emitReset___closed__2;
|
||||
x_13 = lean_string_append(x_11, x_12);
|
||||
x_14 = l_IO_println___rarg___closed__1;
|
||||
x_14 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_15 = lean_string_append(x_13, x_14);
|
||||
lean_inc(x_2);
|
||||
x_16 = l_Nat_forMAux___main___at_Lean_IR_EmitC_emitReset___spec__1(x_3, x_2, x_2, x_4, x_15);
|
||||
|
|
@ -6518,7 +6518,7 @@ x_54 = lean_string_append(x_50, x_53);
|
|||
lean_dec(x_53);
|
||||
x_55 = l_Lean_IR_EmitC_emitReset___closed__2;
|
||||
x_56 = lean_string_append(x_54, x_55);
|
||||
x_57 = l_IO_println___rarg___closed__1;
|
||||
x_57 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_58 = lean_string_append(x_56, x_57);
|
||||
x_59 = l_String_Iterator_HasRepr___closed__2;
|
||||
x_60 = lean_string_append(x_58, x_59);
|
||||
|
|
@ -6556,7 +6556,7 @@ lean_inc(x_11);
|
|||
lean_dec(x_10);
|
||||
x_12 = l_Lean_IR_EmitC_emitMainFn___closed__19;
|
||||
x_13 = lean_string_append(x_11, x_12);
|
||||
x_14 = l_IO_println___rarg___closed__1;
|
||||
x_14 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_15 = lean_string_append(x_13, x_14);
|
||||
x_16 = l_String_Iterator_HasRepr___closed__2;
|
||||
x_17 = lean_string_append(x_15, x_16);
|
||||
|
|
@ -6662,7 +6662,7 @@ x_19 = lean_string_append(x_17, x_18);
|
|||
lean_dec(x_18);
|
||||
x_20 = l_Lean_IR_EmitC_emitInc___closed__1;
|
||||
x_21 = lean_string_append(x_19, x_20);
|
||||
x_22 = l_IO_println___rarg___closed__1;
|
||||
x_22 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_23 = lean_string_append(x_21, x_22);
|
||||
x_24 = lean_box(0);
|
||||
lean_ctor_set(x_6, 1, x_23);
|
||||
|
|
@ -6690,7 +6690,7 @@ x_35 = lean_string_append(x_33, x_34);
|
|||
lean_dec(x_34);
|
||||
x_36 = l_Lean_IR_EmitC_emitInc___closed__1;
|
||||
x_37 = lean_string_append(x_35, x_36);
|
||||
x_38 = l_IO_println___rarg___closed__1;
|
||||
x_38 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_39 = lean_string_append(x_37, x_38);
|
||||
x_40 = lean_box(0);
|
||||
x_41 = lean_alloc_ctor(0, 2, 0);
|
||||
|
|
@ -6744,7 +6744,7 @@ x_19 = lean_string_append(x_17, x_18);
|
|||
lean_dec(x_18);
|
||||
x_20 = l_Lean_IR_EmitC_emitInc___closed__1;
|
||||
x_21 = lean_string_append(x_19, x_20);
|
||||
x_22 = l_IO_println___rarg___closed__1;
|
||||
x_22 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_23 = lean_string_append(x_21, x_22);
|
||||
x_24 = lean_box(0);
|
||||
lean_ctor_set(x_6, 1, x_23);
|
||||
|
|
@ -6772,7 +6772,7 @@ x_35 = lean_string_append(x_33, x_34);
|
|||
lean_dec(x_34);
|
||||
x_36 = l_Lean_IR_EmitC_emitInc___closed__1;
|
||||
x_37 = lean_string_append(x_35, x_36);
|
||||
x_38 = l_IO_println___rarg___closed__1;
|
||||
x_38 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_39 = lean_string_append(x_37, x_38);
|
||||
x_40 = lean_box(0);
|
||||
x_41 = lean_alloc_ctor(0, 2, 0);
|
||||
|
|
@ -6946,7 +6946,7 @@ x_20 = lean_ctor_get(x_17, 0);
|
|||
lean_dec(x_20);
|
||||
x_21 = l_Lean_IR_EmitC_emitInc___closed__1;
|
||||
x_22 = lean_string_append(x_19, x_21);
|
||||
x_23 = l_IO_println___rarg___closed__1;
|
||||
x_23 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_24 = lean_string_append(x_22, x_23);
|
||||
x_25 = lean_box(0);
|
||||
lean_ctor_set(x_17, 1, x_24);
|
||||
|
|
@ -6961,7 +6961,7 @@ lean_inc(x_26);
|
|||
lean_dec(x_17);
|
||||
x_27 = l_Lean_IR_EmitC_emitInc___closed__1;
|
||||
x_28 = lean_string_append(x_26, x_27);
|
||||
x_29 = l_IO_println___rarg___closed__1;
|
||||
x_29 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_30 = lean_string_append(x_28, x_29);
|
||||
x_31 = lean_box(0);
|
||||
x_32 = lean_alloc_ctor(0, 2, 0);
|
||||
|
|
@ -7139,7 +7139,7 @@ x_14 = lean_ctor_get(x_11, 0);
|
|||
lean_dec(x_14);
|
||||
x_15 = l_Lean_IR_EmitC_emitInc___closed__1;
|
||||
x_16 = lean_string_append(x_13, x_15);
|
||||
x_17 = l_IO_println___rarg___closed__1;
|
||||
x_17 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_18 = lean_string_append(x_16, x_17);
|
||||
x_19 = lean_box(0);
|
||||
lean_ctor_set(x_11, 1, x_18);
|
||||
|
|
@ -7154,7 +7154,7 @@ lean_inc(x_20);
|
|||
lean_dec(x_11);
|
||||
x_21 = l_Lean_IR_EmitC_emitInc___closed__1;
|
||||
x_22 = lean_string_append(x_20, x_21);
|
||||
x_23 = l_IO_println___rarg___closed__1;
|
||||
x_23 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_24 = lean_string_append(x_22, x_23);
|
||||
x_25 = lean_box(0);
|
||||
x_26 = lean_alloc_ctor(0, 2, 0);
|
||||
|
|
@ -7240,7 +7240,7 @@ x_24 = lean_string_append(x_6, x_23);
|
|||
lean_dec(x_23);
|
||||
x_25 = l_Lean_IR_formatFnBody___main___closed__1;
|
||||
x_26 = lean_string_append(x_24, x_25);
|
||||
x_27 = l_IO_println___rarg___closed__1;
|
||||
x_27 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_28 = lean_string_append(x_26, x_27);
|
||||
x_29 = lean_box(0);
|
||||
x_30 = lean_alloc_ctor(0, 2, 0);
|
||||
|
|
@ -7332,7 +7332,7 @@ x_17 = lean_ctor_get(x_14, 0);
|
|||
lean_dec(x_17);
|
||||
x_18 = l_Lean_IR_formatFnBody___main___closed__1;
|
||||
x_19 = lean_string_append(x_16, x_18);
|
||||
x_20 = l_IO_println___rarg___closed__1;
|
||||
x_20 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_21 = lean_string_append(x_19, x_20);
|
||||
x_22 = lean_box(0);
|
||||
lean_ctor_set(x_14, 1, x_21);
|
||||
|
|
@ -7347,7 +7347,7 @@ lean_inc(x_23);
|
|||
lean_dec(x_14);
|
||||
x_24 = l_Lean_IR_formatFnBody___main___closed__1;
|
||||
x_25 = lean_string_append(x_23, x_24);
|
||||
x_26 = l_IO_println___rarg___closed__1;
|
||||
x_26 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_27 = lean_string_append(x_25, x_26);
|
||||
x_28 = lean_box(0);
|
||||
x_29 = lean_alloc_ctor(0, 2, 0);
|
||||
|
|
@ -7376,7 +7376,7 @@ x_37 = l_Option_HasRepr___rarg___closed__3;
|
|||
x_38 = lean_string_append(x_35, x_37);
|
||||
x_39 = l_Lean_IR_formatFnBody___main___closed__1;
|
||||
x_40 = lean_string_append(x_38, x_39);
|
||||
x_41 = l_IO_println___rarg___closed__1;
|
||||
x_41 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_42 = lean_string_append(x_40, x_41);
|
||||
x_43 = lean_box(0);
|
||||
lean_ctor_set(x_33, 1, x_42);
|
||||
|
|
@ -7393,7 +7393,7 @@ x_45 = l_Option_HasRepr___rarg___closed__3;
|
|||
x_46 = lean_string_append(x_44, x_45);
|
||||
x_47 = l_Lean_IR_formatFnBody___main___closed__1;
|
||||
x_48 = lean_string_append(x_46, x_47);
|
||||
x_49 = l_IO_println___rarg___closed__1;
|
||||
x_49 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_50 = lean_string_append(x_48, x_49);
|
||||
x_51 = lean_box(0);
|
||||
x_52 = lean_alloc_ctor(0, 2, 0);
|
||||
|
|
@ -7524,7 +7524,7 @@ lean_inc(x_27);
|
|||
lean_dec(x_26);
|
||||
x_28 = l_Lean_IR_EmitC_emitInc___closed__1;
|
||||
x_29 = lean_string_append(x_27, x_28);
|
||||
x_30 = l_IO_println___rarg___closed__1;
|
||||
x_30 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_31 = lean_string_append(x_29, x_30);
|
||||
x_4 = x_10;
|
||||
x_6 = x_31;
|
||||
|
|
@ -7605,7 +7605,7 @@ x_25 = lean_string_append(x_23, x_24);
|
|||
lean_dec(x_24);
|
||||
x_26 = l_Lean_IR_EmitC_emitInc___closed__1;
|
||||
x_27 = lean_string_append(x_25, x_26);
|
||||
x_28 = l_IO_println___rarg___closed__1;
|
||||
x_28 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_29 = lean_string_append(x_27, x_28);
|
||||
lean_inc(x_11);
|
||||
x_30 = l_Nat_forMAux___main___at_Lean_IR_EmitC_emitPartialApp___spec__1(x_1, x_3, x_11, x_11, x_4, x_29);
|
||||
|
|
@ -7764,7 +7764,7 @@ x_26 = lean_ctor_get(x_23, 0);
|
|||
lean_dec(x_26);
|
||||
x_27 = l_Lean_IR_EmitC_emitInc___closed__1;
|
||||
x_28 = lean_string_append(x_25, x_27);
|
||||
x_29 = l_IO_println___rarg___closed__1;
|
||||
x_29 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_30 = lean_string_append(x_28, x_29);
|
||||
x_31 = lean_box(0);
|
||||
lean_ctor_set(x_23, 1, x_30);
|
||||
|
|
@ -7779,7 +7779,7 @@ lean_inc(x_32);
|
|||
lean_dec(x_23);
|
||||
x_33 = l_Lean_IR_EmitC_emitInc___closed__1;
|
||||
x_34 = lean_string_append(x_32, x_33);
|
||||
x_35 = l_IO_println___rarg___closed__1;
|
||||
x_35 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_36 = lean_string_append(x_34, x_35);
|
||||
x_37 = lean_box(0);
|
||||
x_38 = lean_alloc_ctor(0, 2, 0);
|
||||
|
|
@ -7799,7 +7799,7 @@ lean_inc(x_42);
|
|||
lean_dec(x_41);
|
||||
x_43 = l_Lean_IR_EmitC_emitApp___closed__3;
|
||||
x_44 = lean_string_append(x_42, x_43);
|
||||
x_45 = l_IO_println___rarg___closed__1;
|
||||
x_45 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_46 = lean_string_append(x_44, x_45);
|
||||
x_47 = l_Lean_IR_EmitC_emitLhs(x_1, x_4, x_46);
|
||||
x_48 = !lean_is_exclusive(x_47);
|
||||
|
|
@ -8009,7 +8009,7 @@ x_17 = lean_string_append(x_13, x_16);
|
|||
lean_dec(x_16);
|
||||
x_18 = l_Lean_IR_EmitC_emitInc___closed__1;
|
||||
x_19 = lean_string_append(x_17, x_18);
|
||||
x_20 = l_IO_println___rarg___closed__1;
|
||||
x_20 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_21 = lean_string_append(x_19, x_20);
|
||||
x_22 = lean_box(0);
|
||||
lean_ctor_set(x_8, 1, x_21);
|
||||
|
|
@ -8032,7 +8032,7 @@ x_29 = lean_string_append(x_25, x_28);
|
|||
lean_dec(x_28);
|
||||
x_30 = l_Lean_IR_EmitC_emitInc___closed__1;
|
||||
x_31 = lean_string_append(x_29, x_30);
|
||||
x_32 = l_IO_println___rarg___closed__1;
|
||||
x_32 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_33 = lean_string_append(x_31, x_32);
|
||||
x_34 = lean_box(0);
|
||||
x_35 = lean_alloc_ctor(0, 2, 0);
|
||||
|
|
@ -8167,7 +8167,7 @@ x_12 = lean_string_append(x_8, x_11);
|
|||
lean_dec(x_11);
|
||||
x_13 = l_Lean_IR_EmitC_emitInc___closed__1;
|
||||
x_14 = lean_string_append(x_12, x_13);
|
||||
x_15 = l_IO_println___rarg___closed__1;
|
||||
x_15 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_16 = lean_string_append(x_14, x_15);
|
||||
x_17 = lean_box(0);
|
||||
x_18 = lean_alloc_ctor(0, 2, 0);
|
||||
|
|
@ -8217,7 +8217,7 @@ x_14 = lean_string_append(x_10, x_13);
|
|||
lean_dec(x_13);
|
||||
x_15 = l_Lean_IR_EmitC_emitInc___closed__1;
|
||||
x_16 = lean_string_append(x_14, x_15);
|
||||
x_17 = l_IO_println___rarg___closed__1;
|
||||
x_17 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_18 = lean_string_append(x_16, x_17);
|
||||
x_19 = lean_box(0);
|
||||
lean_ctor_set(x_5, 1, x_18);
|
||||
|
|
@ -8240,7 +8240,7 @@ x_26 = lean_string_append(x_22, x_25);
|
|||
lean_dec(x_25);
|
||||
x_27 = l_Lean_IR_EmitC_emitInc___closed__1;
|
||||
x_28 = lean_string_append(x_26, x_27);
|
||||
x_29 = l_IO_println___rarg___closed__1;
|
||||
x_29 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_30 = lean_string_append(x_28, x_29);
|
||||
x_31 = lean_box(0);
|
||||
x_32 = lean_alloc_ctor(0, 2, 0);
|
||||
|
|
@ -8289,7 +8289,7 @@ x_14 = lean_string_append(x_10, x_13);
|
|||
lean_dec(x_13);
|
||||
x_15 = l_Lean_IR_EmitC_emitInc___closed__1;
|
||||
x_16 = lean_string_append(x_14, x_15);
|
||||
x_17 = l_IO_println___rarg___closed__1;
|
||||
x_17 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_18 = lean_string_append(x_16, x_17);
|
||||
x_19 = lean_box(0);
|
||||
lean_ctor_set(x_5, 1, x_18);
|
||||
|
|
@ -8312,7 +8312,7 @@ x_26 = lean_string_append(x_22, x_25);
|
|||
lean_dec(x_25);
|
||||
x_27 = l_Lean_IR_EmitC_emitInc___closed__1;
|
||||
x_28 = lean_string_append(x_26, x_27);
|
||||
x_29 = l_IO_println___rarg___closed__1;
|
||||
x_29 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_30 = lean_string_append(x_28, x_29);
|
||||
x_31 = lean_box(0);
|
||||
x_32 = lean_alloc_ctor(0, 2, 0);
|
||||
|
|
@ -8631,7 +8631,7 @@ x_12 = lean_ctor_get(x_9, 0);
|
|||
lean_dec(x_12);
|
||||
x_13 = l_Lean_IR_formatFnBody___main___closed__1;
|
||||
x_14 = lean_string_append(x_11, x_13);
|
||||
x_15 = l_IO_println___rarg___closed__1;
|
||||
x_15 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_16 = lean_string_append(x_14, x_15);
|
||||
x_17 = lean_box(0);
|
||||
lean_ctor_set(x_9, 1, x_16);
|
||||
|
|
@ -8646,7 +8646,7 @@ lean_inc(x_18);
|
|||
lean_dec(x_9);
|
||||
x_19 = l_Lean_IR_formatFnBody___main___closed__1;
|
||||
x_20 = lean_string_append(x_18, x_19);
|
||||
x_21 = l_IO_println___rarg___closed__1;
|
||||
x_21 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_22 = lean_string_append(x_20, x_21);
|
||||
x_23 = lean_box(0);
|
||||
x_24 = lean_alloc_ctor(0, 2, 0);
|
||||
|
|
@ -8676,7 +8676,7 @@ x_32 = lean_string_append(x_31, x_29);
|
|||
lean_dec(x_29);
|
||||
x_33 = l_Lean_IR_EmitC_emitInc___closed__1;
|
||||
x_34 = lean_string_append(x_32, x_33);
|
||||
x_35 = l_IO_println___rarg___closed__1;
|
||||
x_35 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_36 = lean_string_append(x_34, x_35);
|
||||
x_37 = lean_box(0);
|
||||
lean_ctor_set(x_6, 1, x_36);
|
||||
|
|
@ -8700,7 +8700,7 @@ x_43 = lean_string_append(x_42, x_40);
|
|||
lean_dec(x_40);
|
||||
x_44 = l_Lean_IR_EmitC_emitInc___closed__1;
|
||||
x_45 = lean_string_append(x_43, x_44);
|
||||
x_46 = l_IO_println___rarg___closed__1;
|
||||
x_46 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_47 = lean_string_append(x_45, x_46);
|
||||
x_48 = lean_box(0);
|
||||
x_49 = lean_alloc_ctor(0, 2, 0);
|
||||
|
|
@ -9179,7 +9179,7 @@ lean_inc(x_26);
|
|||
lean_dec(x_25);
|
||||
x_27 = l_Lean_IR_formatFnBody___main___closed__1;
|
||||
x_28 = lean_string_append(x_26, x_27);
|
||||
x_29 = l_IO_println___rarg___closed__1;
|
||||
x_29 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_30 = lean_string_append(x_28, x_29);
|
||||
x_4 = x_10;
|
||||
x_6 = x_30;
|
||||
|
|
@ -9256,7 +9256,7 @@ lean_inc(x_28);
|
|||
lean_dec(x_27);
|
||||
x_29 = l_Lean_IR_formatFnBody___main___closed__1;
|
||||
x_30 = lean_string_append(x_28, x_29);
|
||||
x_31 = l_IO_println___rarg___closed__1;
|
||||
x_31 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_32 = lean_string_append(x_30, x_31);
|
||||
x_4 = x_10;
|
||||
x_6 = x_32;
|
||||
|
|
@ -9331,7 +9331,7 @@ x_26 = lean_string_append(x_24, x_25);
|
|||
lean_dec(x_25);
|
||||
x_27 = l_Lean_IR_formatFnBody___main___closed__1;
|
||||
x_28 = lean_string_append(x_26, x_27);
|
||||
x_29 = l_IO_println___rarg___closed__1;
|
||||
x_29 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_30 = lean_string_append(x_28, x_29);
|
||||
x_4 = x_10;
|
||||
x_6 = x_30;
|
||||
|
|
@ -9455,7 +9455,7 @@ x_17 = lean_ctor_get(x_14, 0);
|
|||
lean_dec(x_17);
|
||||
x_18 = l_Lean_IR_EmitC_emitTailCall___closed__3;
|
||||
x_19 = lean_string_append(x_16, x_18);
|
||||
x_20 = l_IO_println___rarg___closed__1;
|
||||
x_20 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_21 = lean_string_append(x_19, x_20);
|
||||
x_22 = lean_box(0);
|
||||
lean_ctor_set(x_14, 1, x_21);
|
||||
|
|
@ -9470,7 +9470,7 @@ lean_inc(x_23);
|
|||
lean_dec(x_14);
|
||||
x_24 = l_Lean_IR_EmitC_emitTailCall___closed__3;
|
||||
x_25 = lean_string_append(x_23, x_24);
|
||||
x_26 = l_IO_println___rarg___closed__1;
|
||||
x_26 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_27 = lean_string_append(x_25, x_26);
|
||||
x_28 = lean_box(0);
|
||||
x_29 = lean_alloc_ctor(0, 2, 0);
|
||||
|
|
@ -9485,7 +9485,7 @@ lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean
|
|||
lean_dec(x_7);
|
||||
x_30 = l_addParenHeuristic___closed__1;
|
||||
x_31 = lean_string_append(x_3, x_30);
|
||||
x_32 = l_IO_println___rarg___closed__1;
|
||||
x_32 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_33 = lean_string_append(x_31, x_32);
|
||||
lean_inc(x_6);
|
||||
x_34 = l_Nat_forMAux___main___at_Lean_IR_EmitC_emitTailCall___spec__2(x_4, x_5, x_6, x_6, x_2, x_33);
|
||||
|
|
@ -9929,7 +9929,7 @@ x_91 = lean_ctor_get(x_88, 0);
|
|||
lean_dec(x_91);
|
||||
x_92 = l_Lean_IR_formatFnBody___main___closed__1;
|
||||
x_93 = lean_string_append(x_90, x_92);
|
||||
x_94 = l_IO_println___rarg___closed__1;
|
||||
x_94 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_95 = lean_string_append(x_93, x_94);
|
||||
x_96 = lean_box(0);
|
||||
lean_ctor_set(x_88, 1, x_95);
|
||||
|
|
@ -9944,7 +9944,7 @@ lean_inc(x_97);
|
|||
lean_dec(x_88);
|
||||
x_98 = l_Lean_IR_formatFnBody___main___closed__1;
|
||||
x_99 = lean_string_append(x_97, x_98);
|
||||
x_100 = l_IO_println___rarg___closed__1;
|
||||
x_100 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_101 = lean_string_append(x_99, x_100);
|
||||
x_102 = lean_box(0);
|
||||
x_103 = lean_alloc_ctor(0, 2, 0);
|
||||
|
|
@ -9974,7 +9974,7 @@ lean_dec(x_3);
|
|||
lean_dec(x_1);
|
||||
x_107 = l_Lean_IR_EmitC_emitBlock___main___closed__2;
|
||||
x_108 = lean_string_append(x_4, x_107);
|
||||
x_109 = l_IO_println___rarg___closed__1;
|
||||
x_109 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_110 = lean_string_append(x_108, x_109);
|
||||
x_111 = lean_box(0);
|
||||
x_112 = lean_alloc_ctor(0, 2, 0);
|
||||
|
|
@ -10015,7 +10015,7 @@ x_18 = lean_string_append(x_4, x_17);
|
|||
lean_dec(x_17);
|
||||
x_19 = l___private_Init_Util_1__mkPanicMessage___closed__2;
|
||||
x_20 = lean_string_append(x_18, x_19);
|
||||
x_21 = l_IO_println___rarg___closed__1;
|
||||
x_21 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_22 = lean_string_append(x_20, x_21);
|
||||
lean_inc(x_1);
|
||||
lean_inc(x_3);
|
||||
|
|
@ -10113,7 +10113,7 @@ _start:
|
|||
lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; uint8_t x_8; lean_object* x_9; lean_object* x_10; uint8_t x_11;
|
||||
x_4 = l_addParenHeuristic___closed__1;
|
||||
x_5 = lean_string_append(x_3, x_4);
|
||||
x_6 = l_IO_println___rarg___closed__1;
|
||||
x_6 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_7 = lean_string_append(x_5, x_6);
|
||||
x_8 = 0;
|
||||
lean_inc(x_1);
|
||||
|
|
@ -10392,7 +10392,7 @@ x_24 = lean_string_append(x_22, x_23);
|
|||
lean_dec(x_23);
|
||||
x_25 = l_Nat_forMAux___main___at_Lean_IR_EmitC_emitDeclAux___spec__1___closed__3;
|
||||
x_26 = lean_string_append(x_24, x_25);
|
||||
x_27 = l_IO_println___rarg___closed__1;
|
||||
x_27 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_28 = lean_string_append(x_26, x_27);
|
||||
x_3 = x_9;
|
||||
x_5 = x_28;
|
||||
|
|
@ -10673,7 +10673,7 @@ block_86:
|
|||
lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39;
|
||||
x_36 = l_Lean_IR_EmitC_emitDeclAux___closed__1;
|
||||
x_37 = lean_string_append(x_35, x_36);
|
||||
x_38 = l_IO_println___rarg___closed__1;
|
||||
x_38 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_39 = lean_string_append(x_37, x_38);
|
||||
if (x_34 == 0)
|
||||
{
|
||||
|
|
@ -11023,7 +11023,7 @@ block_179:
|
|||
lean_object* x_141; lean_object* x_142; lean_object* x_143; lean_object* x_144;
|
||||
x_141 = l_Lean_IR_EmitC_emitDeclAux___closed__1;
|
||||
x_142 = lean_string_append(x_140, x_141);
|
||||
x_143 = l_IO_println___rarg___closed__1;
|
||||
x_143 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_144 = lean_string_append(x_142, x_143);
|
||||
if (x_139 == 0)
|
||||
{
|
||||
|
|
@ -11488,7 +11488,7 @@ x_14 = lean_ctor_get(x_11, 0);
|
|||
lean_dec(x_14);
|
||||
x_15 = l_Lean_IR_EmitC_emitInc___closed__1;
|
||||
x_16 = lean_string_append(x_13, x_15);
|
||||
x_17 = l_IO_println___rarg___closed__1;
|
||||
x_17 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_18 = lean_string_append(x_16, x_17);
|
||||
x_19 = lean_box(0);
|
||||
lean_ctor_set(x_11, 1, x_18);
|
||||
|
|
@ -11503,7 +11503,7 @@ lean_inc(x_20);
|
|||
lean_dec(x_11);
|
||||
x_21 = l_Lean_IR_EmitC_emitInc___closed__1;
|
||||
x_22 = lean_string_append(x_20, x_21);
|
||||
x_23 = l_IO_println___rarg___closed__1;
|
||||
x_23 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_24 = lean_string_append(x_22, x_23);
|
||||
x_25 = lean_box(0);
|
||||
x_26 = lean_alloc_ctor(0, 2, 0);
|
||||
|
|
@ -11632,7 +11632,7 @@ lean_inc(x_21);
|
|||
lean_dec(x_20);
|
||||
x_22 = l_Lean_IR_EmitC_emitDeclInit___closed__1;
|
||||
x_23 = lean_string_append(x_21, x_22);
|
||||
x_24 = l_IO_println___rarg___closed__1;
|
||||
x_24 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_25 = lean_string_append(x_23, x_24);
|
||||
x_26 = l_Lean_IR_EmitC_emitMarkPersistent(x_1, x_8, x_2, x_25);
|
||||
return x_26;
|
||||
|
|
@ -11702,7 +11702,7 @@ lean_inc(x_39);
|
|||
lean_dec(x_38);
|
||||
x_40 = l_Lean_IR_EmitC_emitMainFn___closed__3;
|
||||
x_41 = lean_string_append(x_39, x_40);
|
||||
x_42 = l_IO_println___rarg___closed__1;
|
||||
x_42 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_43 = lean_string_append(x_41, x_42);
|
||||
x_44 = l_Lean_IR_EmitC_emitDeclInit___closed__2;
|
||||
x_45 = lean_string_append(x_43, x_44);
|
||||
|
|
@ -11846,7 +11846,7 @@ x_83 = lean_ctor_get(x_80, 0);
|
|||
lean_dec(x_83);
|
||||
x_84 = l_Lean_IR_EmitC_emitMainFn___closed__3;
|
||||
x_85 = lean_string_append(x_82, x_84);
|
||||
x_86 = l_IO_println___rarg___closed__1;
|
||||
x_86 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_87 = lean_string_append(x_85, x_86);
|
||||
x_88 = l_Lean_IR_EmitC_emitDeclInit___closed__2;
|
||||
x_89 = lean_string_append(x_87, x_88);
|
||||
|
|
@ -11867,7 +11867,7 @@ lean_inc(x_95);
|
|||
lean_dec(x_80);
|
||||
x_96 = l_Lean_IR_EmitC_emitMainFn___closed__3;
|
||||
x_97 = lean_string_append(x_95, x_96);
|
||||
x_98 = l_IO_println___rarg___closed__1;
|
||||
x_98 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_99 = lean_string_append(x_97, x_98);
|
||||
x_100 = l_Lean_IR_EmitC_emitDeclInit___closed__2;
|
||||
x_101 = lean_string_append(x_99, x_100);
|
||||
|
|
@ -11965,7 +11965,7 @@ lean_inc(x_128);
|
|||
lean_dec(x_127);
|
||||
x_129 = l_Lean_IR_EmitC_emitDeclInit___closed__1;
|
||||
x_130 = lean_string_append(x_128, x_129);
|
||||
x_131 = l_IO_println___rarg___closed__1;
|
||||
x_131 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_132 = lean_string_append(x_130, x_131);
|
||||
x_133 = l_Lean_IR_EmitC_emitMarkPersistent(x_1, x_114, x_2, x_132);
|
||||
return x_133;
|
||||
|
|
@ -12039,7 +12039,7 @@ lean_inc(x_146);
|
|||
lean_dec(x_145);
|
||||
x_147 = l_Lean_IR_EmitC_emitMainFn___closed__3;
|
||||
x_148 = lean_string_append(x_146, x_147);
|
||||
x_149 = l_IO_println___rarg___closed__1;
|
||||
x_149 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_150 = lean_string_append(x_148, x_149);
|
||||
x_151 = l_Lean_IR_EmitC_emitDeclInit___closed__2;
|
||||
x_152 = lean_string_append(x_150, x_151);
|
||||
|
|
@ -12183,7 +12183,7 @@ if (lean_is_exclusive(x_181)) {
|
|||
}
|
||||
x_184 = l_Lean_IR_EmitC_emitMainFn___closed__3;
|
||||
x_185 = lean_string_append(x_182, x_184);
|
||||
x_186 = l_IO_println___rarg___closed__1;
|
||||
x_186 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_187 = lean_string_append(x_185, x_186);
|
||||
x_188 = l_Lean_IR_EmitC_emitDeclInit___closed__2;
|
||||
x_189 = lean_string_append(x_187, x_188);
|
||||
|
|
@ -12291,7 +12291,7 @@ x_17 = l_Array_forMAux___main___at_Lean_IR_EmitC_emitInitFn___spec__1___closed__
|
|||
x_18 = lean_string_append(x_16, x_17);
|
||||
x_19 = lean_string_append(x_4, x_18);
|
||||
lean_dec(x_18);
|
||||
x_20 = l_IO_println___rarg___closed__1;
|
||||
x_20 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_21 = lean_string_append(x_19, x_20);
|
||||
x_2 = x_11;
|
||||
x_4 = x_21;
|
||||
|
|
|
|||
|
|
@ -83,6 +83,7 @@ lean_object* l_Lean_Format_defWidth;
|
|||
lean_object* l_Lean_Format_joinSuffix(lean_object*);
|
||||
lean_object* l_Int_repr(lean_object*);
|
||||
lean_object* l_Lean_Format_repr___main___closed__13;
|
||||
extern lean_object* l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
lean_object* l_Lean_Format_pretty___boxed(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Option_format(lean_object*);
|
||||
lean_object* l_Lean_Format_repr___main___closed__6;
|
||||
|
|
@ -125,7 +126,6 @@ lean_object* lean_name_mk_string(lean_object*, lean_object*);
|
|||
extern lean_object* l_List_repr___rarg___closed__2;
|
||||
lean_object* l_Lean_kvMapHasFormat___closed__1;
|
||||
extern lean_object* l_List_reprAux___main___rarg___closed__1;
|
||||
extern lean_object* l_IO_println___rarg___closed__1;
|
||||
lean_object* l_Lean_formatKVMap(lean_object*);
|
||||
lean_object* l_Function_comp___rarg(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_prodHasFormat(lean_object*, lean_object*);
|
||||
|
|
@ -868,7 +868,7 @@ lean_dec(x_4);
|
|||
x_10 = lean_ctor_get(x_5, 0);
|
||||
lean_inc(x_10);
|
||||
lean_dec(x_5);
|
||||
x_11 = l_IO_println___rarg___closed__1;
|
||||
x_11 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_12 = lean_string_append(x_3, x_11);
|
||||
x_13 = 32;
|
||||
lean_inc(x_10);
|
||||
|
|
@ -3498,7 +3498,7 @@ lean_object* l_String_toFormat(lean_object* x_1) {
|
|||
_start:
|
||||
{
|
||||
lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5;
|
||||
x_2 = l_IO_println___rarg___closed__1;
|
||||
x_2 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_3 = l_String_splitOn(x_1, x_2);
|
||||
x_4 = lean_box(1);
|
||||
x_5 = l_Lean_Format_joinSep___main___at_String_toFormat___spec__1(x_3, x_4);
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -54,6 +54,7 @@ lean_object* lean_array_fget(lean_object*, lean_object*);
|
|||
lean_object* l_Lean_Elab_Command_Visibility_hasToString(uint8_t);
|
||||
lean_object* l_Lean_Elab_Command_getCurrNamespace(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Command_Modifiers_hasToString;
|
||||
uint8_t lean_nat_dec_eq(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Format_joinSep___main___at___private_Lean_Data_Trie_6__toStringAux___main___spec__1(lean_object*, lean_object*);
|
||||
lean_object* lean_nat_sub(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Command_Modifiers_hasToString___lambda__1___boxed(lean_object*);
|
||||
|
|
@ -97,6 +98,7 @@ lean_object* l_Lean_Elab_Command_Visibility_hasToString___closed__1;
|
|||
extern lean_object* l_Lean_Parser_Command_noncomputable___elambda__1___closed__1;
|
||||
uint8_t l_Lean_isAttribute(lean_object*, lean_object*);
|
||||
extern lean_object* l_PersistentArray_Stats_toString___closed__4;
|
||||
lean_object* l_Lean_Syntax_getNumArgs(lean_object*);
|
||||
lean_object* l_Array_foldlStepMAux___main___at_Lean_Elab_Command_elabAttrs___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Command_elabAttr___closed__3;
|
||||
lean_object* l_Lean_Elab_Command_elabAttr___closed__2;
|
||||
|
|
@ -1082,7 +1084,7 @@ lean_object* _init_l_Lean_Elab_Command_elabAttr___closed__1() {
|
|||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_mk_string("identifier expected");
|
||||
x_1 = lean_mk_string("unknown attribute [");
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
|
|
@ -1110,7 +1112,7 @@ lean_object* _init_l_Lean_Elab_Command_elabAttr___closed__4() {
|
|||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_mk_string("unknown attribute [");
|
||||
x_1 = lean_mk_string("identifier expected");
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
|
|
@ -1137,192 +1139,234 @@ return x_2;
|
|||
lean_object* l_Lean_Elab_Command_elabAttr(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_4; lean_object* x_5; lean_object* x_6;
|
||||
x_4 = lean_unsigned_to_nat(0u);
|
||||
x_5 = l_Lean_Syntax_getArg(x_1, x_4);
|
||||
x_6 = l_Lean_Syntax_isIdOrAtom_x3f(x_5);
|
||||
lean_object* x_4; lean_object* x_5; lean_object* x_57; lean_object* x_58; lean_object* x_59;
|
||||
x_57 = lean_unsigned_to_nat(0u);
|
||||
x_58 = l_Lean_Syntax_getArg(x_1, x_57);
|
||||
x_59 = l_Lean_Syntax_isIdOrAtom_x3f(x_58);
|
||||
if (lean_obj_tag(x_59) == 0)
|
||||
{
|
||||
lean_object* x_60; lean_object* x_61; uint8_t x_62;
|
||||
x_60 = l_Lean_Elab_Command_elabAttr___closed__6;
|
||||
x_61 = l_Lean_Elab_Command_throwError___rarg(x_58, x_60, x_2, x_3);
|
||||
lean_dec(x_58);
|
||||
x_62 = !lean_is_exclusive(x_61);
|
||||
if (x_62 == 0)
|
||||
{
|
||||
return x_61;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_63; lean_object* x_64; lean_object* x_65;
|
||||
x_63 = lean_ctor_get(x_61, 0);
|
||||
x_64 = lean_ctor_get(x_61, 1);
|
||||
lean_inc(x_64);
|
||||
lean_inc(x_63);
|
||||
lean_dec(x_61);
|
||||
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_58);
|
||||
x_66 = lean_ctor_get(x_59, 0);
|
||||
lean_inc(x_66);
|
||||
lean_dec(x_59);
|
||||
x_67 = lean_box(0);
|
||||
x_68 = lean_name_mk_string(x_67, x_66);
|
||||
x_4 = x_68;
|
||||
x_5 = x_3;
|
||||
goto block_56;
|
||||
}
|
||||
block_56:
|
||||
{
|
||||
lean_object* x_6;
|
||||
lean_inc(x_2);
|
||||
x_6 = l_Lean_Elab_Command_getEnv(x_2, x_5);
|
||||
if (lean_obj_tag(x_6) == 0)
|
||||
{
|
||||
lean_object* x_7; lean_object* x_8; uint8_t x_9;
|
||||
x_7 = l_Lean_Elab_Command_elabAttr___closed__3;
|
||||
x_8 = l_Lean_Elab_Command_throwError___rarg(x_5, x_7, x_2, x_3);
|
||||
lean_dec(x_5);
|
||||
x_9 = !lean_is_exclusive(x_8);
|
||||
if (x_9 == 0)
|
||||
uint8_t x_7;
|
||||
x_7 = !lean_is_exclusive(x_6);
|
||||
if (x_7 == 0)
|
||||
{
|
||||
return x_8;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_10; lean_object* x_11; lean_object* x_12;
|
||||
x_10 = lean_ctor_get(x_8, 0);
|
||||
x_11 = lean_ctor_get(x_8, 1);
|
||||
lean_inc(x_11);
|
||||
lean_inc(x_10);
|
||||
lean_object* x_8; lean_object* x_9; uint8_t x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; uint8_t x_15;
|
||||
x_8 = lean_ctor_get(x_6, 0);
|
||||
x_9 = lean_ctor_get(x_6, 1);
|
||||
x_10 = l_Lean_isAttribute(x_8, x_4);
|
||||
lean_dec(x_8);
|
||||
x_12 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_12, 0, x_10);
|
||||
lean_ctor_set(x_12, 1, x_11);
|
||||
return x_12;
|
||||
x_11 = lean_unsigned_to_nat(1u);
|
||||
x_12 = l_Lean_Syntax_getArg(x_1, x_11);
|
||||
x_13 = l_Lean_Syntax_getNumArgs(x_12);
|
||||
x_14 = lean_unsigned_to_nat(0u);
|
||||
x_15 = lean_nat_dec_eq(x_13, x_14);
|
||||
lean_dec(x_13);
|
||||
if (x_10 == 0)
|
||||
{
|
||||
lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; uint8_t x_22;
|
||||
lean_dec(x_12);
|
||||
lean_free_object(x_6);
|
||||
x_16 = lean_alloc_ctor(4, 1, 0);
|
||||
lean_ctor_set(x_16, 0, x_4);
|
||||
x_17 = l_Lean_Elab_Command_elabAttr___closed__3;
|
||||
x_18 = lean_alloc_ctor(9, 2, 0);
|
||||
lean_ctor_set(x_18, 0, x_17);
|
||||
lean_ctor_set(x_18, 1, x_16);
|
||||
x_19 = l_Lean_MessageData_arrayExpr_toMessageData___main___closed__1;
|
||||
x_20 = lean_alloc_ctor(9, 2, 0);
|
||||
lean_ctor_set(x_20, 0, x_18);
|
||||
lean_ctor_set(x_20, 1, x_19);
|
||||
x_21 = l_Lean_Elab_Command_throwError___rarg(x_1, x_20, x_2, x_9);
|
||||
x_22 = !lean_is_exclusive(x_21);
|
||||
if (x_22 == 0)
|
||||
{
|
||||
return x_21;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_23; lean_object* x_24; lean_object* x_25;
|
||||
x_23 = lean_ctor_get(x_21, 0);
|
||||
x_24 = lean_ctor_get(x_21, 1);
|
||||
lean_inc(x_24);
|
||||
lean_inc(x_23);
|
||||
lean_dec(x_21);
|
||||
x_25 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_25, 0, x_23);
|
||||
lean_ctor_set(x_25, 1, x_24);
|
||||
return x_25;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16;
|
||||
lean_dec(x_5);
|
||||
x_13 = lean_ctor_get(x_6, 0);
|
||||
lean_inc(x_13);
|
||||
lean_dec(x_6);
|
||||
x_14 = lean_box(0);
|
||||
x_15 = lean_name_mk_string(x_14, x_13);
|
||||
lean_inc(x_2);
|
||||
x_16 = l_Lean_Elab_Command_getEnv(x_2, x_3);
|
||||
if (lean_obj_tag(x_16) == 0)
|
||||
{
|
||||
uint8_t x_17;
|
||||
x_17 = !lean_is_exclusive(x_16);
|
||||
if (x_17 == 0)
|
||||
{
|
||||
lean_object* x_18; lean_object* x_19; uint8_t x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23;
|
||||
x_18 = lean_ctor_get(x_16, 0);
|
||||
x_19 = lean_ctor_get(x_16, 1);
|
||||
x_20 = l_Lean_isAttribute(x_18, x_15);
|
||||
lean_dec(x_18);
|
||||
x_21 = lean_unsigned_to_nat(1u);
|
||||
x_22 = l_Lean_Syntax_getArg(x_1, x_21);
|
||||
lean_inc(x_15);
|
||||
x_23 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_23, 0, x_15);
|
||||
lean_ctor_set(x_23, 1, x_22);
|
||||
if (x_20 == 0)
|
||||
{
|
||||
lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; uint8_t x_30;
|
||||
lean_dec(x_23);
|
||||
lean_free_object(x_16);
|
||||
x_24 = lean_alloc_ctor(4, 1, 0);
|
||||
lean_ctor_set(x_24, 0, x_15);
|
||||
x_25 = l_Lean_Elab_Command_elabAttr___closed__6;
|
||||
x_26 = lean_alloc_ctor(9, 2, 0);
|
||||
lean_ctor_set(x_26, 0, x_25);
|
||||
lean_ctor_set(x_26, 1, x_24);
|
||||
x_27 = l_Lean_MessageData_arrayExpr_toMessageData___main___closed__1;
|
||||
x_28 = lean_alloc_ctor(9, 2, 0);
|
||||
lean_ctor_set(x_28, 0, x_26);
|
||||
lean_ctor_set(x_28, 1, x_27);
|
||||
x_29 = l_Lean_Elab_Command_throwError___rarg(x_1, x_28, x_2, x_19);
|
||||
x_30 = !lean_is_exclusive(x_29);
|
||||
if (x_30 == 0)
|
||||
{
|
||||
return x_29;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_31; lean_object* x_32; lean_object* x_33;
|
||||
x_31 = lean_ctor_get(x_29, 0);
|
||||
x_32 = lean_ctor_get(x_29, 1);
|
||||
lean_inc(x_32);
|
||||
lean_inc(x_31);
|
||||
lean_dec(x_29);
|
||||
x_33 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_33, 0, x_31);
|
||||
lean_ctor_set(x_33, 1, x_32);
|
||||
return x_33;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_dec(x_15);
|
||||
lean_dec(x_2);
|
||||
lean_ctor_set(x_16, 0, x_23);
|
||||
return x_16;
|
||||
if (x_15 == 0)
|
||||
{
|
||||
lean_object* x_26;
|
||||
x_26 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_26, 0, x_4);
|
||||
lean_ctor_set(x_26, 1, x_12);
|
||||
lean_ctor_set(x_6, 0, x_26);
|
||||
return x_6;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_27; lean_object* x_28;
|
||||
lean_dec(x_12);
|
||||
x_27 = lean_box(0);
|
||||
x_28 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_28, 0, x_4);
|
||||
lean_ctor_set(x_28, 1, x_27);
|
||||
lean_ctor_set(x_6, 0, x_28);
|
||||
return x_6;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_34; lean_object* x_35; uint8_t x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39;
|
||||
x_34 = lean_ctor_get(x_16, 0);
|
||||
x_35 = lean_ctor_get(x_16, 1);
|
||||
lean_inc(x_35);
|
||||
lean_inc(x_34);
|
||||
lean_dec(x_16);
|
||||
x_36 = l_Lean_isAttribute(x_34, x_15);
|
||||
lean_object* x_29; lean_object* x_30; uint8_t x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; uint8_t x_36;
|
||||
x_29 = lean_ctor_get(x_6, 0);
|
||||
x_30 = lean_ctor_get(x_6, 1);
|
||||
lean_inc(x_30);
|
||||
lean_inc(x_29);
|
||||
lean_dec(x_6);
|
||||
x_31 = l_Lean_isAttribute(x_29, x_4);
|
||||
lean_dec(x_29);
|
||||
x_32 = lean_unsigned_to_nat(1u);
|
||||
x_33 = l_Lean_Syntax_getArg(x_1, x_32);
|
||||
x_34 = l_Lean_Syntax_getNumArgs(x_33);
|
||||
x_35 = lean_unsigned_to_nat(0u);
|
||||
x_36 = lean_nat_dec_eq(x_34, x_35);
|
||||
lean_dec(x_34);
|
||||
x_37 = lean_unsigned_to_nat(1u);
|
||||
x_38 = l_Lean_Syntax_getArg(x_1, x_37);
|
||||
lean_inc(x_15);
|
||||
x_39 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_39, 0, x_15);
|
||||
lean_ctor_set(x_39, 1, x_38);
|
||||
if (x_31 == 0)
|
||||
{
|
||||
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_dec(x_33);
|
||||
x_37 = lean_alloc_ctor(4, 1, 0);
|
||||
lean_ctor_set(x_37, 0, x_4);
|
||||
x_38 = l_Lean_Elab_Command_elabAttr___closed__3;
|
||||
x_39 = lean_alloc_ctor(9, 2, 0);
|
||||
lean_ctor_set(x_39, 0, x_38);
|
||||
lean_ctor_set(x_39, 1, x_37);
|
||||
x_40 = l_Lean_MessageData_arrayExpr_toMessageData___main___closed__1;
|
||||
x_41 = lean_alloc_ctor(9, 2, 0);
|
||||
lean_ctor_set(x_41, 0, x_39);
|
||||
lean_ctor_set(x_41, 1, x_40);
|
||||
x_42 = l_Lean_Elab_Command_throwError___rarg(x_1, x_41, x_2, x_30);
|
||||
x_43 = lean_ctor_get(x_42, 0);
|
||||
lean_inc(x_43);
|
||||
x_44 = lean_ctor_get(x_42, 1);
|
||||
lean_inc(x_44);
|
||||
if (lean_is_exclusive(x_42)) {
|
||||
lean_ctor_release(x_42, 0);
|
||||
lean_ctor_release(x_42, 1);
|
||||
x_45 = x_42;
|
||||
} else {
|
||||
lean_dec_ref(x_42);
|
||||
x_45 = lean_box(0);
|
||||
}
|
||||
if (lean_is_scalar(x_45)) {
|
||||
x_46 = lean_alloc_ctor(1, 2, 0);
|
||||
} else {
|
||||
x_46 = x_45;
|
||||
}
|
||||
lean_ctor_set(x_46, 0, x_43);
|
||||
lean_ctor_set(x_46, 1, x_44);
|
||||
return x_46;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_dec(x_2);
|
||||
if (x_36 == 0)
|
||||
{
|
||||
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_dec(x_39);
|
||||
x_40 = lean_alloc_ctor(4, 1, 0);
|
||||
lean_ctor_set(x_40, 0, x_15);
|
||||
x_41 = l_Lean_Elab_Command_elabAttr___closed__6;
|
||||
x_42 = lean_alloc_ctor(9, 2, 0);
|
||||
lean_ctor_set(x_42, 0, x_41);
|
||||
lean_ctor_set(x_42, 1, x_40);
|
||||
x_43 = l_Lean_MessageData_arrayExpr_toMessageData___main___closed__1;
|
||||
x_44 = lean_alloc_ctor(9, 2, 0);
|
||||
lean_ctor_set(x_44, 0, x_42);
|
||||
lean_ctor_set(x_44, 1, x_43);
|
||||
x_45 = l_Lean_Elab_Command_throwError___rarg(x_1, x_44, x_2, x_35);
|
||||
x_46 = lean_ctor_get(x_45, 0);
|
||||
lean_inc(x_46);
|
||||
x_47 = lean_ctor_get(x_45, 1);
|
||||
lean_inc(x_47);
|
||||
if (lean_is_exclusive(x_45)) {
|
||||
lean_ctor_release(x_45, 0);
|
||||
lean_ctor_release(x_45, 1);
|
||||
x_48 = x_45;
|
||||
} else {
|
||||
lean_dec_ref(x_45);
|
||||
x_48 = lean_box(0);
|
||||
}
|
||||
if (lean_is_scalar(x_48)) {
|
||||
x_49 = lean_alloc_ctor(1, 2, 0);
|
||||
} else {
|
||||
x_49 = x_48;
|
||||
}
|
||||
lean_ctor_set(x_49, 0, x_46);
|
||||
lean_ctor_set(x_49, 1, x_47);
|
||||
return x_49;
|
||||
lean_object* x_47; lean_object* x_48;
|
||||
x_47 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_47, 0, x_4);
|
||||
lean_ctor_set(x_47, 1, x_33);
|
||||
x_48 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_48, 0, x_47);
|
||||
lean_ctor_set(x_48, 1, x_30);
|
||||
return x_48;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_50;
|
||||
lean_dec(x_15);
|
||||
lean_dec(x_2);
|
||||
lean_object* x_49; lean_object* x_50; lean_object* x_51;
|
||||
lean_dec(x_33);
|
||||
x_49 = lean_box(0);
|
||||
x_50 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_50, 0, x_39);
|
||||
lean_ctor_set(x_50, 1, x_35);
|
||||
return x_50;
|
||||
lean_ctor_set(x_50, 0, x_4);
|
||||
lean_ctor_set(x_50, 1, x_49);
|
||||
x_51 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_51, 0, x_50);
|
||||
lean_ctor_set(x_51, 1, x_30);
|
||||
return x_51;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_51;
|
||||
lean_dec(x_15);
|
||||
uint8_t x_52;
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_2);
|
||||
x_51 = !lean_is_exclusive(x_16);
|
||||
if (x_51 == 0)
|
||||
x_52 = !lean_is_exclusive(x_6);
|
||||
if (x_52 == 0)
|
||||
{
|
||||
return x_16;
|
||||
return x_6;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_52; lean_object* x_53; lean_object* x_54;
|
||||
x_52 = lean_ctor_get(x_16, 0);
|
||||
x_53 = lean_ctor_get(x_16, 1);
|
||||
lean_object* x_53; lean_object* x_54; lean_object* x_55;
|
||||
x_53 = lean_ctor_get(x_6, 0);
|
||||
x_54 = lean_ctor_get(x_6, 1);
|
||||
lean_inc(x_54);
|
||||
lean_inc(x_53);
|
||||
lean_inc(x_52);
|
||||
lean_dec(x_16);
|
||||
x_54 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_54, 0, x_52);
|
||||
lean_ctor_set(x_54, 1, x_53);
|
||||
return x_54;
|
||||
lean_dec(x_6);
|
||||
x_55 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_55, 0, x_53);
|
||||
lean_ctor_set(x_55, 1, x_54);
|
||||
return x_55;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -13,16 +13,19 @@
|
|||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern lean_object* l_EIO_Monad___closed__1;
|
||||
lean_object* l_Lean_MetaIO_metaHasEval___rarg(lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, lean_object*);
|
||||
lean_object* l_Lean_MetaIO_getOptions(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_metaHasEvalOfHasEval(lean_object*);
|
||||
lean_object* l_Lean_MetaIO_monadIO(lean_object*);
|
||||
lean_object* l_Lean_MetaIO_monadIO___rarg(lean_object*, lean_object*, lean_object*);
|
||||
extern lean_object* l_IO_MonadIO;
|
||||
lean_object* l_ReaderT_monadIO___rarg(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_MetaIO_monadIO;
|
||||
lean_object* l_Lean_metaHasEvalOfHasEval___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_MetaIO_monadIO___rarg___boxed(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_MetaIO_metaHasEval___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_MetaIO_getEnv___boxed(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_metaHasEvalOfHasEval___rarg(lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, lean_object*);
|
||||
lean_object* l_Lean_MetaIO_monadIO___closed__1;
|
||||
lean_object* l_Lean_MetaIO_monadIO___closed__2;
|
||||
lean_object* l_Lean_MetaIO_metaHasEval(lean_object*);
|
||||
lean_object* l_Lean_MetaIO_getOptions___boxed(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_MetaIO_getEnv(lean_object*, lean_object*);
|
||||
|
|
@ -165,29 +168,47 @@ x_8 = l_Lean_MetaIO_metaHasEval___rarg(x_1, x_2, x_3, x_4, x_7, x_6);
|
|||
return x_8;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_MetaIO_monadIO___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
|
||||
lean_object* _init_l_Lean_MetaIO_monadIO___closed__1() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_4;
|
||||
x_4 = lean_apply_1(x_1, x_3);
|
||||
return x_4;
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3;
|
||||
x_1 = l_EIO_Monad___closed__1;
|
||||
x_2 = l_IO_MonadIO;
|
||||
x_3 = l_ReaderT_monadIO___rarg(x_1, x_2);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_MetaIO_monadIO(lean_object* x_1) {
|
||||
lean_object* _init_l_Lean_MetaIO_monadIO___closed__2() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_2;
|
||||
x_2 = lean_alloc_closure((void*)(l_Lean_MetaIO_monadIO___rarg___boxed), 3, 0);
|
||||
return x_2;
|
||||
lean_object* x_1; uint8_t x_2;
|
||||
x_1 = l_Lean_MetaIO_monadIO___closed__1;
|
||||
x_2 = !lean_is_exclusive(x_1);
|
||||
if (x_2 == 0)
|
||||
{
|
||||
return x_1;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_3; lean_object* x_4; lean_object* x_5;
|
||||
x_3 = lean_ctor_get(x_1, 0);
|
||||
x_4 = lean_ctor_get(x_1, 1);
|
||||
lean_inc(x_4);
|
||||
lean_inc(x_3);
|
||||
lean_dec(x_1);
|
||||
x_5 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_5, 0, x_3);
|
||||
lean_ctor_set(x_5, 1, x_4);
|
||||
return x_5;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_MetaIO_monadIO___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
|
||||
}
|
||||
lean_object* _init_l_Lean_MetaIO_monadIO() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_4;
|
||||
x_4 = l_Lean_MetaIO_monadIO___rarg(x_1, x_2, x_3);
|
||||
lean_dec(x_2);
|
||||
return x_4;
|
||||
lean_object* x_1;
|
||||
x_1 = l_Lean_MetaIO_monadIO___closed__2;
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
lean_object* initialize_Init_Control_Reader(lean_object*);
|
||||
|
|
@ -207,6 +228,12 @@ lean_dec_ref(res);
|
|||
res = initialize_Lean_Environment(lean_io_mk_world());
|
||||
if (lean_io_result_is_error(res)) return res;
|
||||
lean_dec_ref(res);
|
||||
l_Lean_MetaIO_monadIO___closed__1 = _init_l_Lean_MetaIO_monadIO___closed__1();
|
||||
lean_mark_persistent(l_Lean_MetaIO_monadIO___closed__1);
|
||||
l_Lean_MetaIO_monadIO___closed__2 = _init_l_Lean_MetaIO_monadIO___closed__2();
|
||||
lean_mark_persistent(l_Lean_MetaIO_monadIO___closed__2);
|
||||
l_Lean_MetaIO_monadIO = _init_l_Lean_MetaIO_monadIO();
|
||||
lean_mark_persistent(l_Lean_MetaIO_monadIO);
|
||||
return lean_mk_io_result(lean_box(0));
|
||||
}
|
||||
#ifdef __cplusplus
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@ lean_object* l_Lean_Meta_throwBug(lean_object*);
|
|||
lean_object* l_Lean_Meta_whnfForall(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_MetavarContext_instantiateMVars(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_dbgTrace___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* lean_io_prim_put_str(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_InfoCacheKey_Inhabited;
|
||||
lean_object* l_Lean_Meta_getEnv(lean_object*);
|
||||
lean_object* l_Lean_Meta_withNewLocalInstances___main___at_Lean_Meta_forallTelescope___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -138,6 +137,7 @@ lean_object* l_Lean_Meta_MetaM_inhabited___rarg(lean_object*);
|
|||
lean_object* l_Lean_Meta_TransparencyMode_Hashable___closed__1;
|
||||
lean_object* l_Lean_Meta_getEnv___rarg(lean_object*);
|
||||
lean_object* l_Lean_MetavarContext_hasAssignableMVar___main(lean_object*, lean_object*);
|
||||
extern lean_object* l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
lean_object* l_Lean_Meta_getConfig___boxed(lean_object*, lean_object*);
|
||||
uint8_t lean_metavar_ctx_is_expr_assigned(lean_object*, lean_object*);
|
||||
extern lean_object* l_Lean_LocalContext_Inhabited___closed__2;
|
||||
|
|
@ -225,7 +225,6 @@ lean_object* l_Lean_Meta_metaExt___closed__1;
|
|||
lean_object* l_Lean_Meta_run___rarg(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_ReaderT_pure___at_Lean_Meta_MetaExtState_inhabited___spec__1(lean_object*);
|
||||
lean_object* l_Lean_Meta_InfoCacheKey_HasBeq___boxed(lean_object*, lean_object*);
|
||||
extern lean_object* l_IO_println___rarg___closed__1;
|
||||
lean_object* l_Lean_Meta_setMVarKind(lean_object*, uint8_t, lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Meta_Basic_4__forallTelescopeReducingAuxAux___main___at_Lean_Meta_isClassExpensive___main___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
extern lean_object* l_PersistentArray_empty___closed__3;
|
||||
|
|
@ -294,6 +293,7 @@ lean_object* l_Lean_Meta_withNewLocalInstances___main___at_Lean_Meta_forallBound
|
|||
extern lean_object* l___private_Lean_Environment_5__envExtensionsRef;
|
||||
lean_object* l_Lean_Meta_forallMetaTelescopeReducing(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_isDelayedAssigned___boxed(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Init_System_IO_1__putStr___at_Lean_HasRepr_hasEval___spec__3(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_approxDefEq(lean_object*);
|
||||
lean_object* l_Lean_Meta_shouldReduceReducibleOnly___boxed(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_mkIsExprDefEqAuxRef(lean_object*);
|
||||
|
|
@ -50205,7 +50205,7 @@ _start:
|
|||
lean_object* x_3; lean_object* x_4; lean_object* x_5;
|
||||
x_3 = l_Lean_Options_empty;
|
||||
x_4 = l_Lean_Format_pretty(x_1, x_3);
|
||||
x_5 = lean_io_prim_put_str(x_4, x_2);
|
||||
x_5 = l___private_Init_System_IO_1__putStr___at_Lean_HasRepr_hasEval___spec__3(x_4, x_2);
|
||||
lean_dec(x_4);
|
||||
return x_5;
|
||||
}
|
||||
|
|
@ -50221,8 +50221,8 @@ lean_object* x_4; lean_object* x_5; lean_object* x_6;
|
|||
x_4 = lean_ctor_get(x_3, 1);
|
||||
lean_inc(x_4);
|
||||
lean_dec(x_3);
|
||||
x_5 = l_IO_println___rarg___closed__1;
|
||||
x_6 = lean_io_prim_put_str(x_5, x_4);
|
||||
x_5 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_6 = l___private_Init_System_IO_1__putStr___at_Lean_HasRepr_hasEval___spec__3(x_5, x_4);
|
||||
return x_6;
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -97,6 +97,7 @@ lean_object* l___private_Lean_Meta_RecursorInfo_1__mkRecursorInfoForKernelRec___
|
|||
lean_object* l___private_Lean_Meta_RecursorInfo_5__getMajorPosDepElim(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_RecursorInfo_HasToString___closed__4;
|
||||
lean_object* l___private_Lean_Meta_RecursorInfo_1__mkRecursorInfoForKernelRec___closed__2;
|
||||
extern lean_object* l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
lean_object* l_Lean_Expr_getAppNumArgsAux___main(lean_object*, lean_object*);
|
||||
lean_object* l_List_replicate___rarg(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_casesOnSuffix;
|
||||
|
|
@ -170,7 +171,6 @@ lean_object* l_List_toString___at_Lean_Meta_RecursorInfo_HasToString___spec__7__
|
|||
lean_object* l_Array_back___at___private_Lean_Meta_ExprDefEq_14__processAssignmentFOApproxAux___spec__1(lean_object*);
|
||||
extern lean_object* l_List_reprAux___main___rarg___closed__1;
|
||||
lean_object* l___private_Lean_Meta_RecursorInfo_5__getMajorPosDepElim___closed__3;
|
||||
extern lean_object* l_IO_println___rarg___closed__1;
|
||||
lean_object* l_Lean_Meta_RecursorInfo_HasToString(lean_object*);
|
||||
lean_object* l_List_toStringAux___main___at_Lean_Meta_RecursorInfo_HasToString___spec__8___closed__1;
|
||||
lean_object* l___private_Lean_Meta_RecursorInfo_10__getProduceMotiveAndRecursive___closed__1;
|
||||
|
|
@ -1158,7 +1158,7 @@ x_4 = l_Lean_Name_toStringWithSep___main(x_3, x_2);
|
|||
x_5 = l_Lean_Meta_RecursorInfo_HasToString___closed__3;
|
||||
x_6 = lean_string_append(x_5, x_4);
|
||||
lean_dec(x_4);
|
||||
x_7 = l_IO_println___rarg___closed__1;
|
||||
x_7 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_8 = lean_string_append(x_6, x_7);
|
||||
x_9 = l_Lean_Meta_RecursorInfo_HasToString___closed__4;
|
||||
x_10 = lean_string_append(x_8, x_9);
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@ lean_object* lean_io_timeit(lean_object*, lean_object*, lean_object*);
|
|||
lean_object* l_Lean_Parser_Module_import___closed__4;
|
||||
lean_object* l_unreachable_x21___rarg(lean_object*);
|
||||
extern lean_object* l_Lean_nullKind;
|
||||
lean_object* lean_io_prim_put_str(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Parser_parseHeader(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Parser_ModuleParserState_inhabited___closed__1;
|
||||
lean_object* l_Lean_Parser_testModuleParser___closed__2;
|
||||
|
|
@ -37,7 +36,6 @@ extern lean_object* l_Array_empty___closed__1;
|
|||
extern lean_object* l_Lean_Parser_ident;
|
||||
lean_object* l_Lean_Parser_ParserState_mkNode(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Parser_mkParserState(lean_object*);
|
||||
lean_object* l_IO_FS_Handle_getLine___at_Lean_Parser_parseFile___spec__3___boxed(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Parser_Module_prelude___elambda__1___closed__2;
|
||||
lean_object* l_Lean_Parser_Module_import;
|
||||
lean_object* l_Lean_Parser_Module_import___elambda__1___closed__2;
|
||||
|
|
@ -50,7 +48,6 @@ lean_object* lean_array_push(lean_object*, lean_object*);
|
|||
lean_object* lean_array_get_size(lean_object*);
|
||||
lean_object* l_Lean_Parser_Module_prelude___elambda__1___closed__1;
|
||||
lean_object* lean_string_append(lean_object*, lean_object*);
|
||||
lean_object* l_IO_FS_Handle_readToEndAux___main___at_Lean_Parser_parseFile___spec__2___boxed(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Parser_tokenFn(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Parser_Module_updateTokens___closed__1;
|
||||
lean_object* l_Lean_Parser_Module_import___closed__9;
|
||||
|
|
@ -63,6 +60,8 @@ extern lean_object* l_String_splitAux___main___closed__1;
|
|||
lean_object* l_Array_forMAux___main___at___private_Lean_Parser_Module_4__testModuleParserAux___main___spec__9___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Parser_Module_header___elambda__1___closed__3;
|
||||
lean_object* l_Lean_Parser_parseFile(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_IO_FS_Handle_mk___at_Lean_Parser_parseFile___spec__2(lean_object*, uint8_t, uint8_t, lean_object*);
|
||||
lean_object* l_IO_FS_Handle_getLine___at_Lean_Parser_parseFile___spec__4___boxed(lean_object*, lean_object*);
|
||||
extern lean_object* l_Lean_mkAppStx___closed__4;
|
||||
lean_object* l_Lean_Parser_ParserState_mkErrorsAt(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_IO_FS_readFile___at_Lean_Parser_parseFile___spec__1___boxed(lean_object*, lean_object*);
|
||||
|
|
@ -73,12 +72,14 @@ lean_object* lean_nat_add(lean_object*, lean_object*);
|
|||
lean_object* l_Lean_Parser_Module_prelude___closed__4;
|
||||
lean_object* l___private_Lean_Parser_Module_2__mkEOI___closed__3;
|
||||
lean_object* l_Lean_Parser_Module_header___elambda__1___closed__1;
|
||||
extern lean_object* l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
lean_object* l_Array_forMAux___main___at___private_Lean_Parser_Module_4__testModuleParserAux___main___spec__10___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Parser_initCacheForInput(lean_object*);
|
||||
lean_object* l_Lean_Parser_Module_import___elambda__1___closed__4;
|
||||
lean_object* l_Lean_Parser_parseFileAux___main___closed__2;
|
||||
lean_object* l_Lean_Parser_Module_import___elambda__1___closed__11;
|
||||
extern lean_object* l_Lean_Parser_Command_exit___elambda__1___closed__2;
|
||||
lean_object* l_IO_FS_Handle_readToEndAux___main___at_Lean_Parser_parseFile___spec__3(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Parser_Module_header___elambda__1___closed__2;
|
||||
lean_object* l_Array_forMAux___main___at___private_Lean_Parser_Module_4__testModuleParserAux___main___spec__8(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* lean_array_fget(lean_object*, lean_object*);
|
||||
|
|
@ -98,6 +99,7 @@ lean_object* l_Lean_Parser_Module_header___closed__8;
|
|||
lean_object* l_Lean_Parser_testModuleParser___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Parser_parseCommand___main(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_IO_print___at___private_Lean_Parser_Module_4__testModuleParserAux___main___spec__2(lean_object*, lean_object*);
|
||||
lean_object* l_IO_Prim_fopenFlags(uint8_t, uint8_t);
|
||||
lean_object* l_Array_forMAux___main___at___private_Lean_Parser_Module_4__testModuleParserAux___main___spec__10(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
extern lean_object* l_Char_HasRepr___closed__1;
|
||||
lean_object* l_Lean_Parser_Module_header___closed__6;
|
||||
|
|
@ -106,12 +108,12 @@ lean_object* l_Lean_Parser_Module_prelude___elambda__1___closed__10;
|
|||
lean_object* l_Lean_Parser_testModuleParser___closed__1;
|
||||
lean_object* l_IO_println___at___private_Lean_Parser_Module_4__testModuleParserAux___main___spec__1(lean_object*, lean_object*);
|
||||
lean_object* lean_name_mk_string(lean_object*, lean_object*);
|
||||
extern lean_object* l_IO_println___rarg___closed__1;
|
||||
extern lean_object* l_PersistentArray_empty___closed__3;
|
||||
lean_object* l_Lean_Parser_Module_prelude___elambda__1___closed__7;
|
||||
lean_object* l_Lean_Parser_addParserTokens(lean_object*, lean_object*);
|
||||
extern lean_object* l_Lean_Options_empty;
|
||||
lean_object* l___private_Lean_Parser_Module_4__testModuleParserAux___main___closed__1;
|
||||
lean_object* l_IO_FS_Handle_readToEndAux___main___at_Lean_Parser_parseFile___spec__3___boxed(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Parser_Module_import___closed__1;
|
||||
uint8_t l_PersistentArray_isEmpty___rarg(lean_object*);
|
||||
lean_object* l___private_Lean_Parser_Module_4__testModuleParserAux___main___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -125,8 +127,10 @@ lean_object* l_Lean_Parser_ParserState_restore(lean_object*, lean_object*, lean_
|
|||
lean_object* l_Lean_Parser_Module_header;
|
||||
lean_object* l_Lean_Parser_Module_import___closed__6;
|
||||
lean_object* l_Lean_Parser_Module_header___closed__5;
|
||||
lean_object* l_IO_FS_Handle_getLine___at_Lean_Parser_parseFile___spec__4(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Parser_Module_prelude___closed__5;
|
||||
lean_object* l_Lean_Parser_Module_import___closed__2;
|
||||
lean_object* l___private_Init_System_IO_1__putStr___at_Lean_HasRepr_hasEval___spec__3(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Parser_ModuleParserState_inhabited;
|
||||
lean_object* l_Lean_Parser_Module_prelude___elambda__1___closed__5;
|
||||
lean_object* l_Lean_Parser_ident___elambda__1(lean_object*, lean_object*);
|
||||
|
|
@ -145,7 +149,6 @@ lean_object* l___private_Lean_Parser_Module_2__mkEOI___closed__1;
|
|||
lean_object* l_Lean_Parser_Module_header___closed__7;
|
||||
lean_object* l_Lean_Parser_Module_import___closed__7;
|
||||
lean_object* l_Lean_Parser_symbolInfo(lean_object*);
|
||||
lean_object* l_IO_FS_Handle_getLine___at_Lean_Parser_parseFile___spec__3(lean_object*, lean_object*);
|
||||
extern lean_object* l_Lean_Parser_epsilonInfo;
|
||||
lean_object* l_Lean_Parser_Module_prelude___elambda__1___closed__6;
|
||||
lean_object* l_Lean_Parser_categoryParser___elambda__1(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -158,6 +161,7 @@ lean_object* l_Lean_Parser_Module_header___closed__3;
|
|||
lean_object* l_IO_print___at___private_Lean_Parser_Module_4__testModuleParserAux___main___spec__4(lean_object*, lean_object*);
|
||||
lean_object* l_String_trim(lean_object*);
|
||||
lean_object* l___private_Lean_Parser_Module_4__testModuleParserAux(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_IO_FS_Handle_mk___at_Lean_Parser_parseFile___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
uint8_t l_Lean_Syntax_isOfKind(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Parser_Module_import___closed__5;
|
||||
lean_object* l_Array_forMAux___main___at___private_Lean_Parser_Module_4__testModuleParserAux___main___spec__8___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -173,8 +177,6 @@ lean_object* l_Lean_Parser_Module_prelude___elambda__1___closed__3;
|
|||
lean_object* l_Lean_Syntax_formatStxAux___main(lean_object*, uint8_t, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Parser_Module_import___elambda__1___closed__9;
|
||||
lean_object* l_PersistentArray_forM___at___private_Lean_Parser_Module_4__testModuleParserAux___main___spec__6(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_IO_FS_Handle_readToEndAux___main___at_Lean_Parser_parseFile___spec__2(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_IO_FS_Handle_mk___at_IO_FS_withFile___spec__1(lean_object*, uint8_t, uint8_t, lean_object*);
|
||||
lean_object* l_Lean_Parser_ParserState_mkUnexpectedError(lean_object*, lean_object*);
|
||||
lean_object* l_EStateM_pure___rarg(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Message_toString(lean_object*);
|
||||
|
|
@ -183,6 +185,7 @@ lean_object* l_Lean_Parser_parseFileAux___main(lean_object*, lean_object*, lean_
|
|||
lean_object* l_Lean_Parser_Module_import___elambda__1___closed__3;
|
||||
uint8_t lean_string_utf8_at_end(lean_object*, lean_object*);
|
||||
lean_object* lean_test_module_parser(lean_object*, lean_object*, lean_object*, uint8_t, lean_object*);
|
||||
lean_object* lean_io_prim_handle_mk(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Parser_Module_prelude___elambda__1___closed__4;
|
||||
lean_object* l_Lean_Parser_Module_import___elambda__1___closed__6;
|
||||
lean_object* l___private_Lean_Parser_Module_4__testModuleParserAux___main(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -2513,7 +2516,7 @@ x_5 = lean_unsigned_to_nat(0u);
|
|||
x_6 = l_Lean_Syntax_formatStxAux___main(x_3, x_4, x_5, x_1);
|
||||
x_7 = l_Lean_Options_empty;
|
||||
x_8 = l_Lean_Format_pretty(x_6, x_7);
|
||||
x_9 = lean_io_prim_put_str(x_8, x_2);
|
||||
x_9 = l___private_Init_System_IO_1__putStr___at_Lean_HasRepr_hasEval___spec__3(x_8, x_2);
|
||||
lean_dec(x_8);
|
||||
return x_9;
|
||||
}
|
||||
|
|
@ -2529,8 +2532,8 @@ lean_object* x_4; lean_object* x_5; lean_object* x_6;
|
|||
x_4 = lean_ctor_get(x_3, 1);
|
||||
lean_inc(x_4);
|
||||
lean_dec(x_3);
|
||||
x_5 = l_IO_println___rarg___closed__1;
|
||||
x_6 = lean_io_prim_put_str(x_5, x_4);
|
||||
x_5 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_6 = l___private_Init_System_IO_1__putStr___at_Lean_HasRepr_hasEval___spec__3(x_5, x_4);
|
||||
return x_6;
|
||||
}
|
||||
else
|
||||
|
|
@ -2562,7 +2565,7 @@ _start:
|
|||
{
|
||||
lean_object* x_3; lean_object* x_4;
|
||||
x_3 = l_Lean_Message_toString(x_1);
|
||||
x_4 = lean_io_prim_put_str(x_3, x_2);
|
||||
x_4 = l___private_Init_System_IO_1__putStr___at_Lean_HasRepr_hasEval___spec__3(x_3, x_2);
|
||||
lean_dec(x_3);
|
||||
return x_4;
|
||||
}
|
||||
|
|
@ -2578,8 +2581,8 @@ lean_object* x_4; lean_object* x_5; lean_object* x_6;
|
|||
x_4 = lean_ctor_get(x_3, 1);
|
||||
lean_inc(x_4);
|
||||
lean_dec(x_3);
|
||||
x_5 = l_IO_println___rarg___closed__1;
|
||||
x_6 = lean_io_prim_put_str(x_5, x_4);
|
||||
x_5 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_6 = l___private_Init_System_IO_1__putStr___at_Lean_HasRepr_hasEval___spec__3(x_5, x_4);
|
||||
return x_6;
|
||||
}
|
||||
else
|
||||
|
|
@ -3504,7 +3507,17 @@ x_7 = l_Lean_Parser_parseFileAux___main(x_1, x_2, x_3, x_4, x_5, x_6);
|
|||
return x_7;
|
||||
}
|
||||
}
|
||||
lean_object* l_IO_FS_Handle_getLine___at_Lean_Parser_parseFile___spec__3(lean_object* x_1, lean_object* x_2) {
|
||||
lean_object* l_IO_FS_Handle_mk___at_Lean_Parser_parseFile___spec__2(lean_object* x_1, uint8_t x_2, uint8_t x_3, lean_object* x_4) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_5; lean_object* x_6;
|
||||
x_5 = l_IO_Prim_fopenFlags(x_2, x_3);
|
||||
x_6 = lean_io_prim_handle_mk(x_1, x_5, x_4);
|
||||
lean_dec(x_5);
|
||||
return x_6;
|
||||
}
|
||||
}
|
||||
lean_object* l_IO_FS_Handle_getLine___at_Lean_Parser_parseFile___spec__4(lean_object* x_1, lean_object* x_2) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_3;
|
||||
|
|
@ -3512,7 +3525,7 @@ x_3 = lean_io_prim_handle_get_line(x_1, x_2);
|
|||
return x_3;
|
||||
}
|
||||
}
|
||||
lean_object* l_IO_FS_Handle_readToEndAux___main___at_Lean_Parser_parseFile___spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
|
||||
lean_object* l_IO_FS_Handle_readToEndAux___main___at_Lean_Parser_parseFile___spec__3(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_4;
|
||||
|
|
@ -3610,7 +3623,7 @@ _start:
|
|||
uint8_t x_3; uint8_t x_4; lean_object* x_5;
|
||||
x_3 = 0;
|
||||
x_4 = 0;
|
||||
x_5 = l_IO_FS_Handle_mk___at_IO_FS_withFile___spec__1(x_1, x_3, x_4, x_2);
|
||||
x_5 = l_IO_FS_Handle_mk___at_Lean_Parser_parseFile___spec__2(x_1, x_3, x_4, x_2);
|
||||
if (lean_obj_tag(x_5) == 0)
|
||||
{
|
||||
lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9;
|
||||
|
|
@ -3620,7 +3633,7 @@ x_7 = lean_ctor_get(x_5, 1);
|
|||
lean_inc(x_7);
|
||||
lean_dec(x_5);
|
||||
x_8 = l_String_splitAux___main___closed__1;
|
||||
x_9 = l_IO_FS_Handle_readToEndAux___main___at_Lean_Parser_parseFile___spec__2(x_6, x_8, x_7);
|
||||
x_9 = l_IO_FS_Handle_readToEndAux___main___at_Lean_Parser_parseFile___spec__3(x_6, x_8, x_7);
|
||||
lean_dec(x_6);
|
||||
return x_9;
|
||||
}
|
||||
|
|
@ -3739,20 +3752,33 @@ return x_26;
|
|||
}
|
||||
}
|
||||
}
|
||||
lean_object* l_IO_FS_Handle_getLine___at_Lean_Parser_parseFile___spec__3___boxed(lean_object* x_1, lean_object* x_2) {
|
||||
lean_object* l_IO_FS_Handle_mk___at_Lean_Parser_parseFile___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_2);
|
||||
lean_dec(x_2);
|
||||
x_6 = lean_unbox(x_3);
|
||||
lean_dec(x_3);
|
||||
x_7 = l_IO_FS_Handle_mk___at_Lean_Parser_parseFile___spec__2(x_1, x_5, x_6, x_4);
|
||||
lean_dec(x_1);
|
||||
return x_7;
|
||||
}
|
||||
}
|
||||
lean_object* l_IO_FS_Handle_getLine___at_Lean_Parser_parseFile___spec__4___boxed(lean_object* x_1, lean_object* x_2) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_3;
|
||||
x_3 = l_IO_FS_Handle_getLine___at_Lean_Parser_parseFile___spec__3(x_1, x_2);
|
||||
x_3 = l_IO_FS_Handle_getLine___at_Lean_Parser_parseFile___spec__4(x_1, x_2);
|
||||
lean_dec(x_1);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
lean_object* l_IO_FS_Handle_readToEndAux___main___at_Lean_Parser_parseFile___spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
|
||||
lean_object* l_IO_FS_Handle_readToEndAux___main___at_Lean_Parser_parseFile___spec__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_4;
|
||||
x_4 = l_IO_FS_Handle_readToEndAux___main___at_Lean_Parser_parseFile___spec__2(x_1, x_2, x_3);
|
||||
x_4 = l_IO_FS_Handle_readToEndAux___main___at_Lean_Parser_parseFile___spec__3(x_1, x_2, x_3);
|
||||
lean_dec(x_1);
|
||||
return x_4;
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue