mirror of
https://github.com/leanprover/lean4.git
synced 2026-03-17 18:34:06 +00:00
chore: fix tests
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import Lean.Expr
|
||||
import Lean
|
||||
open Lean
|
||||
|
||||
def main : IO UInt32 :=
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import Lean.Parser.Term
|
||||
import Lean
|
||||
open Lean
|
||||
open Lean.Parser
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import Init.Lean
|
||||
import Lean
|
||||
open Lean
|
||||
open Lean.Elab
|
||||
open Lean.Elab.Term
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import Init.Lean
|
||||
import Lean
|
||||
|
||||
namespace Lean
|
||||
open Lean.Elab
|
||||
|
||||
@@ -3,7 +3,7 @@ open Lean
|
||||
open Lean.IR
|
||||
|
||||
def tst : IO Unit :=
|
||||
do env ← importModules [{module := `Init.Lean.Compiler.IR.Basic}];
|
||||
do env ← importModules [{module := `Lean.Compiler.IR.Basic}];
|
||||
ctorLayout ← IO.ofExcept $ getCtorLayout env `Lean.IR.Expr.reuse;
|
||||
ctorLayout.fieldInfo.forM $ fun finfo => IO.println (format finfo);
|
||||
IO.println "---";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import Init.Lean
|
||||
import Lean
|
||||
open Lean
|
||||
|
||||
#eval (mkFVar `a).hasFVar
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import Init.Lean
|
||||
import Lean
|
||||
new_frontend
|
||||
open Lean
|
||||
#check mkNullNode -- Lean.Syntax
|
||||
|
||||
@@ -39,7 +39,7 @@ let (debug, f) : Bool × String := match args with
|
||||
| [f] => (false, f)
|
||||
| _ => panic! "usage: file [-d]";
|
||||
initSearchPath none;
|
||||
env ← importModules [{module := `Init.Lean.Parser}];
|
||||
env ← importModules [{module := `Lean.Parser}];
|
||||
stx ← Lean.Parser.parseFile env args.head!;
|
||||
let header := stx.getArg 0;
|
||||
some s ← pure header.reprint | throw $ IO.userError "header reprint failed";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import Init.Lean
|
||||
import Lean
|
||||
open Lean
|
||||
open Lean.Meta
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import Init.Lean
|
||||
import Lean
|
||||
|
||||
new_frontend
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import Init.Lean
|
||||
import Lean
|
||||
open Lean
|
||||
|
||||
def c1 : Bool := true
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import Init.Lean
|
||||
import Lean
|
||||
open Lean
|
||||
|
||||
def x := 10
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import Init.Lean
|
||||
import Lean
|
||||
open Lean
|
||||
|
||||
def mkTerm : Nat → Expr
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import Init.Lean
|
||||
import Lean
|
||||
open Lean
|
||||
open Lean.Meta
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import Init.Lean
|
||||
import Lean
|
||||
|
||||
universe u
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import Init.Lean
|
||||
import Lean
|
||||
open Lean
|
||||
open Lean.Meta
|
||||
|
||||
def tst1 : IO Unit :=
|
||||
do let mods := [`Init.Lean];
|
||||
do let mods := [`Lean];
|
||||
env ← importModules $ mods.map $ fun m => {module := m};
|
||||
let insts := env.getGlobalInstances;
|
||||
IO.println (format insts);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import Init.Lean
|
||||
import Lean
|
||||
open Lean
|
||||
|
||||
def tst : IO Unit :=
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import Init.Lean
|
||||
import Lean
|
||||
|
||||
open Lean
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import Init.Lean
|
||||
import Lean
|
||||
open Lean
|
||||
|
||||
def checkDefEq (a b : Name) : MetaIO Unit := do
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import Init.Lean
|
||||
import Lean
|
||||
new_frontend
|
||||
open Lean
|
||||
|
||||
|
||||
@@ -107,10 +107,10 @@ mkLet `a (mkSort levelOne) nat (mkForall `x BinderInfo.default (mkBVar 0) (mkBVa
|
||||
#eval tstInferType [`Init.Core] $ mkLit (Literal.strVal "hello")
|
||||
#eval tstInferType [`Init.Core] $ mkMData {} $ mkLit (Literal.natVal 10)
|
||||
|
||||
#eval tstInferType [`Init.Lean.Util.Trace] (mkProj `Inhabited 0 (mkConst `Lean.TraceState.Inhabited []))
|
||||
#eval tstInferType [`Init.Lean.Util.Trace] (mkProj `Lean.TraceState 0 (mkProj `Inhabited 0 (mkConst `Lean.TraceState.Inhabited [])))
|
||||
#eval tstWHNF [`Init.Lean.Util.Trace] (mkProj `Inhabited 0 (mkConst `Lean.TraceState.Inhabited []))
|
||||
#eval tstWHNF [`Init.Lean.Util.Trace] (mkProj `Lean.TraceState 0 (mkProj `Inhabited 0 (mkConst `Lean.TraceState.Inhabited [])))
|
||||
#eval tstInferType [`Lean.Util.Trace] (mkProj `Inhabited 0 (mkConst `Lean.TraceState.Inhabited []))
|
||||
#eval tstInferType [`Lean.Util.Trace] (mkProj `Lean.TraceState 0 (mkProj `Inhabited 0 (mkConst `Lean.TraceState.Inhabited [])))
|
||||
#eval tstWHNF [`Lean.Util.Trace] (mkProj `Inhabited 0 (mkConst `Lean.TraceState.Inhabited []))
|
||||
#eval tstWHNF [`Lean.Util.Trace] (mkProj `Lean.TraceState 0 (mkProj `Inhabited 0 (mkConst `Lean.TraceState.Inhabited [])))
|
||||
|
||||
def t10 : Expr :=
|
||||
let nat := mkConst `Nat [];
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import Init.Lean
|
||||
import Lean
|
||||
|
||||
open Lean
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import Init.Lean
|
||||
import Lean
|
||||
open Lean
|
||||
|
||||
structure S1 :=
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import Init.Lean
|
||||
import Lean
|
||||
|
||||
open Lean
|
||||
open Lean.Elab
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import Init.Lean
|
||||
import Lean
|
||||
open Lean
|
||||
open Lean.Elab
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import Init.Lean
|
||||
import Lean
|
||||
|
||||
open Lean
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import Init.Lean
|
||||
import Lean
|
||||
open Lean
|
||||
|
||||
#eval toString $
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import Init.Lean
|
||||
import Lean
|
||||
|
||||
new_frontend
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import Init.Lean
|
||||
import Lean
|
||||
open Lean
|
||||
open Lean.Elab
|
||||
open Lean.Elab.Term
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import Init.Lean
|
||||
import Lean
|
||||
open Lean
|
||||
open Lean.Elab
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import Init.Lean
|
||||
import Lean
|
||||
|
||||
open Lean
|
||||
|
||||
|
||||
Reference in New Issue
Block a user