lean4-htt/tests/elab_fail/doErrorMsg.lean
Garmelon 08eb78a5b2
chore: switch to new test/bench suite (#12590)
This PR sets up the new integrated test/bench suite. It then migrates
all benchmarks and some related tests to the new suite. There's also
some documentation and some linting.

For now, a lot of the old tests are left alone so this PR doesn't become
even larger than it already is. Eventually, all tests should be migrated
to the new suite though so there isn't a confusing mix of two systems.
2026-02-25 13:51:53 +00:00

29 lines
563 B
Text

def f : IO Nat := do
IO.println "hello"
IO.getStdin
return 10
def f1 : ExceptT String (StateT Nat Id) Nat := do
modify (· + 1)
get
def f2 (x : Nat) : ExceptT String (StateT Nat Id) Nat := do
modify (· + x)
get
def g1 : ExceptT String (StateT Nat Id) Unit := do
let x : String ← f1
return ()
def g2 : ExceptT String (StateT Nat Id) Unit := do
let x : String ← f2 10
return ()
def g3 : ExceptT String (StateT Nat Id) String := do
let x ← f2
f1
example : Nat := Id.run do
let mut n : Nat := 0
(n, _) := (false, false)
n