chore: remove new_frontend from tests
This commit is contained in:
parent
24a6ee1810
commit
db9e390b4d
315 changed files with 315 additions and 315 deletions
|
|
@ -1,4 +1,4 @@
|
|||
new_frontend
|
||||
|
||||
|
||||
def main (xs : List String) : IO Unit :=
|
||||
let ys1 := List.replicate 1000000 1;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
new_frontend
|
||||
|
||||
|
||||
def foo (a : Array Nat) : Array Nat :=
|
||||
let a := a.push 0
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import Std.Data.BinomialHeap
|
||||
new_frontend
|
||||
|
||||
open Std
|
||||
|
||||
abbrev Heap := BinomialHeap Nat (fun a b => a < b)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
new_frontend
|
||||
|
||||
def main (xs : List String) : IO Unit :=
|
||||
let arr := (let e := ByteArray.empty; e.push (UInt8.ofNat 10));
|
||||
let v := arr.data.get! 0;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
new_frontend
|
||||
|
||||
def f (x : Nat) : Nat × (Nat → String) :=
|
||||
let x1 := x + 1
|
||||
let x2 := x + 2
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
new_frontend
|
||||
|
||||
def f (x : Nat) : Nat × (Nat → String) :=
|
||||
let x1 := x + 1
|
||||
let x2 := x + 2
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
new_frontend
|
||||
|
||||
def f (x : Nat) : Nat × (Nat → String) :=
|
||||
let x1 := x + 1
|
||||
let x2 := x + 2
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
new_frontend
|
||||
|
||||
def f (x : Nat) : Nat × (Nat → String) :=
|
||||
let x1 := x + 1
|
||||
let x2 := x + 2
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
new_frontend
|
||||
|
||||
def f (x : Nat) : Nat × (Nat → String) :=
|
||||
let x1 := x + 1;
|
||||
let x2 := x + 2;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
new_frontend
|
||||
|
||||
def f (x : Nat) : Nat × (Nat → String) :=
|
||||
let x1 := x + 1;
|
||||
let x2 := x + 2;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
new_frontend
|
||||
|
||||
def f (x : Nat) : Nat × (Nat → String) :=
|
||||
let x1 := x + 1;
|
||||
let x2 := x + 2;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
new_frontend
|
||||
|
||||
def f (x : Nat) : Nat × (Nat → String) :=
|
||||
let x1 := x + 1;
|
||||
let x2 := x + 2;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import Lean
|
||||
new_frontend
|
||||
|
||||
open Lean
|
||||
|
||||
def main : IO UInt32 := do
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
new_frontend
|
||||
|
||||
def tst1 : IO Unit := do
|
||||
IO.println (1 : Float);
|
||||
IO.println ((1 : Float) + 2);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
new_frontend
|
||||
|
||||
inductive Term : Type
|
||||
| const : Nat -> Term
|
||||
| app : List Term -> Term
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
new_frontend
|
||||
|
||||
|
||||
namespace Foo
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ Copyright (c) 2019 Microsoft Corporation. All rights reserved.
|
|||
Released under Apache 2.0 license as described in the file LICENSE.
|
||||
Author: Leonardo de Moura
|
||||
-/
|
||||
new_frontend
|
||||
|
||||
universes u v w
|
||||
|
||||
inductive LazyList (α : Type u)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
new_frontend
|
||||
|
||||
def f2 (n : Nat) (xs : List Nat) : List (List Nat) :=
|
||||
let ys := List.replicate n 0;
|
||||
xs.map (fun x => x :: ys)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
new_frontend
|
||||
|
||||
set_option pp.implicit true
|
||||
set_option pp.binder_types false
|
||||
-- set_option trace.compiler.boxed true
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import Std.Data.PersistentHashMap
|
||||
import Lean.Data.Format
|
||||
new_frontend
|
||||
|
||||
open Lean Std Std.PersistentHashMap
|
||||
|
||||
abbrev Map := PersistentHashMap Nat Nat
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ def Foo.f3 (f : Foo) : Nat := f.n
|
|||
def Foo.f4 (f : Foo) : Nat := f.n
|
||||
def Foo.f5 (f : Foo) : Nat := f.n
|
||||
|
||||
new_frontend
|
||||
|
||||
|
||||
#check (λ f g h =>
|
||||
let x : Foo := ⟨f.n + 1⟩;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
new_frontend
|
||||
|
||||
|
||||
namespace Repro
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import Lean
|
||||
new_frontend
|
||||
|
||||
open Lean
|
||||
open Lean.Elab
|
||||
open Lean.Elab.Term
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
new_frontend
|
||||
|
||||
open IO.Process
|
||||
|
||||
def usingIO {α} (x : IO α) : IO α := x
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/-! Parse and reformat file -/
|
||||
import Lean.PrettyPrinter
|
||||
new_frontend
|
||||
|
||||
open Lean
|
||||
open Lean.Elab
|
||||
open Lean.Elab.Term
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import Lean
|
||||
new_frontend
|
||||
|
||||
namespace Lean
|
||||
open Lean.Elab
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import Lean.Expr
|
||||
new_frontend
|
||||
|
||||
open Lean
|
||||
|
||||
def tst : IO Unit :=
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
new_frontend
|
||||
|
||||
def f (x : Nat) (g : Nat → Nat) := g x
|
||||
|
||||
#check f 1 fun x => x -- should work
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
new_frontend
|
||||
|
||||
|
||||
def M := StateM Nat
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
new_frontend
|
||||
|
||||
|
||||
theorem ex1 : False :=
|
||||
by {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
new_frontend
|
||||
|
||||
partial def mkAssocArray : Nat → Array (Nat × Bool) → Array (Nat × Bool)
|
||||
| 0, as => as
|
||||
| i+1, as => mkAssocArray i (as.push (i, i % 2 == 0))
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
new_frontend
|
||||
|
||||
def tst : IO Unit :=
|
||||
do
|
||||
let bs := [1, 2, 3].toByteArray;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
new_frontend
|
||||
|
||||
class C1 (x : outParam Nat) (y : { n : Nat // n > x }) (α : Type) := -- should fail
|
||||
(val : α)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
new_frontend
|
||||
|
||||
|
||||
variables {α : Type} in
|
||||
def f (a : α) : List α :=
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import Lean.Compiler.IR
|
||||
new_frontend
|
||||
|
||||
open Lean
|
||||
open Lean.IR
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
new_frontend
|
||||
|
||||
|
||||
def f (x : Nat) :=
|
||||
if x = 0 then panic! "unexpected zero"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
new_frontend
|
||||
|
||||
|
||||
def f1 (x : Nat) : IO Nat := do
|
||||
y := 1 -- error 'y' cannot be reassigned
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
new_frontend
|
||||
|
||||
|
||||
universes u
|
||||
variables {α : Type u}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
new_frontend
|
||||
|
||||
|
||||
structure A :=
|
||||
(x : Nat := 0)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
new_frontend
|
||||
|
||||
|
||||
def c {α} : Sum α Nat :=
|
||||
Sum.inr 10
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
prelude
|
||||
import Init.System.IO
|
||||
new_frontend
|
||||
|
||||
#eval (throw $ IO.userError "this is my error" : IO Unit)
|
||||
#eval (throw $ IO.Error.noFileOrDirectory "file.ext" 31 "and details" : IO Unit)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
new_frontend
|
||||
|
||||
|
||||
def foo
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
new_frontend
|
||||
|
||||
#eval "abc"
|
||||
|
||||
/- some "a" -/
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
prelude
|
||||
import Init.System.IO
|
||||
new_frontend
|
||||
|
||||
open IO.FS
|
||||
def usingIO {α} (x : IO α) : IO α := x
|
||||
#eval (discard $ IO.FS.Handle.mk "non-existent-file.txt" Mode.read : IO Unit)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
new_frontend
|
||||
|
||||
|
||||
def f1 := id
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
new_frontend
|
||||
|
||||
|
||||
def f (x : Nat) : Nat :=
|
||||
id (_ x)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
new_frontend
|
||||
|
||||
|
||||
set_option hygienicIntro false in
|
||||
theorem ex1 {a p q r : Prop} : p → (p → q) → (q → r) → r := by
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
new_frontend
|
||||
|
||||
|
||||
-- Test1
|
||||
inductive T1 : Nat -- Error, resultant type is not a sort
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
new_frontend
|
||||
|
||||
|
||||
def A.foo {α : Type} [HasAdd α] (a : α) : α × α :=
|
||||
(a, a + a)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import Lean.Expr
|
||||
new_frontend
|
||||
|
||||
open Lean
|
||||
|
||||
def tst : IO Unit :=
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import Lean.Data.Json.Parser
|
||||
import Lean.Data.Json.Printer
|
||||
new_frontend
|
||||
|
||||
def test (s : String) : String :=
|
||||
match Lean.Json.parse s with
|
||||
| Except.ok res => toString res
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
new_frontend
|
||||
|
||||
|
||||
def f1.g := 10
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
new_frontend
|
||||
|
||||
partial def f : List Nat → Bool
|
||||
| [] => false
|
||||
| (a::as) => a > 0 && f as
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import Lean.Level
|
||||
new_frontend
|
||||
|
||||
namespace Lean
|
||||
namespace Level
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
new_frontend
|
||||
|
||||
|
||||
def f1 :=
|
||||
if h:x then 1 else 0
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
new_frontend
|
||||
|
||||
open Lean
|
||||
def check (b : Bool) : IO Unit :=
|
||||
«unless» b $ throw $ IO.userError "check failed"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
new_frontend
|
||||
|
||||
|
||||
#print "---- h1"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
new_frontend
|
||||
|
||||
|
||||
#print "---- Op"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
new_frontend
|
||||
|
||||
|
||||
def f (x : Nat) : Nat :=
|
||||
match x with
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
new_frontend
|
||||
|
||||
|
||||
def f1 (x : Nat × Nat) : Nat :=
|
||||
match x with
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
new_frontend
|
||||
|
||||
|
||||
def head {α} (xs : List α) (h : xs = [] → False) : α :=
|
||||
match he:xs with
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
new_frontend
|
||||
|
||||
|
||||
mutual
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
new_frontend
|
||||
|
||||
|
||||
mutual
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import Lean.MetavarContext
|
||||
new_frontend
|
||||
|
||||
open Lean
|
||||
|
||||
def check (b : Bool) : IO Unit :=
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import Lean.MetavarContext
|
||||
new_frontend
|
||||
|
||||
open Lean
|
||||
|
||||
def check (b : Bool) : IO Unit :=
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import Lean.MetavarContext
|
||||
new_frontend
|
||||
|
||||
open Lean
|
||||
|
||||
def mkLambdaTest (mctx : MetavarContext) (ngen : NameGenerator) (lctx : LocalContext) (xs : Array Expr) (e : Expr)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import Lean
|
||||
new_frontend
|
||||
|
||||
open Lean
|
||||
|
||||
#eval (mkFVar `a).hasFVar
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
new_frontend
|
||||
|
||||
|
||||
def f (x : Nat) (y : Bool) :=
|
||||
x + if y then 1 else 0
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
new_frontend
|
||||
|
||||
|
||||
#check `foo
|
||||
#check `foo.bla
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
new_frontend
|
||||
|
||||
|
||||
def A.x := 10
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
new_frontend
|
||||
|
||||
|
||||
-- New notation that overlaps with existing notation
|
||||
syntax [myPair, 100] "(" term "," term ")" : term
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import Std.Data.PersistentHashMap
|
||||
new_frontend
|
||||
|
||||
open Std
|
||||
def m : PersistentHashMap Nat Nat :=
|
||||
let m : PersistentHashMap Nat Nat := {};
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import Lean
|
||||
new_frontend
|
||||
|
||||
|
||||
/-! Pretty printing tests for `Expr`s that cannot be generated by parsing+elaborating. -/
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
new_frontend
|
||||
|
||||
|
||||
#check id fun x => x -- should work
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
new_frontend
|
||||
|
||||
|
||||
-- Issue 1
|
||||
def foo := 10
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
new_frontend
|
||||
|
||||
|
||||
namespace Foo
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
new_frontend
|
||||
|
||||
def inc (r : IO.Ref Nat) : IO Unit := do
|
||||
let v ← r.get;
|
||||
r.set (v+1);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
new_frontend
|
||||
|
||||
def foo {m} [Monad m] [MonadExcept String m] [MonadState (Array Nat) m] : m Nat :=
|
||||
tryCatch
|
||||
(do modify $ fun (a : Array Nat) => a.set! 0 33;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import Lean
|
||||
|
||||
new_frontend
|
||||
|
||||
|
||||
def Boo.x := 1
|
||||
def Foo.x := 2
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
new_frontend
|
||||
|
||||
|
||||
axiom appendNil {α} (as : List α) : as ++ [] = as
|
||||
axiom appendAssoc {α} (as bs cs : List α) : (as ++ bs) ++ cs = as ++ (bs ++ cs)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
new_frontend
|
||||
|
||||
|
||||
macro m n:ident : command => `(def $n := 1)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import Lean
|
||||
new_frontend
|
||||
|
||||
open Lean
|
||||
#check mkNullNode -- Lean.Syntax
|
||||
#check mkNullNode #[] -- Lean.Syntax
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
new_frontend
|
||||
|
||||
|
||||
abbrev DelabM := Id
|
||||
abbrev Delab := DelabM Nat
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
new_frontend
|
||||
|
||||
|
||||
class HasElems (α : Type) : Type := (elems : Array α)
|
||||
def elems (α : Type) [HasElems α] : Array α := HasElems.elems
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import Lean
|
||||
new_frontend
|
||||
|
||||
|
||||
namespace Foo
|
||||
open Lean.Elab.Term
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
new_frontend
|
||||
|
||||
|
||||
def all (p : Nat → Prop) : Prop := ∀x, p x
|
||||
example {p : Nat → Prop} (h : all p) : p 0 := h 0
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
new_frontend
|
||||
|
||||
|
||||
inductive type
|
||||
| bv : Nat → type
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
new_frontend
|
||||
|
||||
|
||||
structure bv (w : Nat) := (u:Unit)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
new_frontend
|
||||
|
||||
|
||||
def foo : Nat -> Nat -> Nat -> List Nat
|
||||
| _, _, 0 => [1]
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
new_frontend
|
||||
|
||||
|
||||
partial def foo : ∀ (n : Nat), StateM Unit Unit
|
||||
| n =>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
new_frontend
|
||||
|
||||
|
||||
universes u v w
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
new_frontend
|
||||
|
||||
|
||||
syntax [mycheck] "#check" (sepBy term ",") : command
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import Lean.Meta
|
||||
|
||||
new_frontend
|
||||
|
||||
|
||||
open Lean
|
||||
open Lean.Meta
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ prelude
|
|||
import Init.System.IO
|
||||
import Init.Data.List.Control
|
||||
import Init.Data.ToString
|
||||
new_frontend
|
||||
|
||||
|
||||
open IO.FS
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
new_frontend
|
||||
|
||||
|
||||
def tst : IO (Option Nat) := do
|
||||
let x? : Option Nat ← pure none;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
new_frontend
|
||||
|
||||
|
||||
structure ConstantFunction (α β : Type) :=
|
||||
(f : α → β)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/-! Reprint file after removing all parentheses and then passing it through the parenthesizer -/
|
||||
import Lean.Parser
|
||||
new_frontend
|
||||
|
||||
open Lean
|
||||
open Lean.Format
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
new_frontend
|
||||
|
||||
|
||||
structure Foo := (n : Nat)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
new_frontend
|
||||
|
||||
#check @Array.mk
|
||||
|
||||
def v : Array Nat := @Array.mk Nat 10 (fun ⟨i, _⟩ => i)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
new_frontend
|
||||
|
||||
|
||||
def f (x y : Nat) (h : x = y := by assumption) : Nat :=
|
||||
x + x
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue