lean4-htt/tests/elab/thunkTaskCasesOn.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

39 lines
715 B
Text

def thunk1 : Thunk String := "foo"
/-- info: "foo" -/
#guard_msgs in
#eval let ⟨fn⟩ := thunk1; fn ()
/-- info: "foo" -/
#guard_msgs in
#eval (thunk1.casesOn id () : String)
def thunk2 : Thunk String := "bar"
/-- info: "bar" -/
#guard_msgs in
#eval (thunk2.casesOn id () : String)
/-- info: "bar" -/
#guard_msgs in
#eval let ⟨fn⟩ := thunk2; fn ()
def task1 : Task String := Task.pure "foo"
/-- info: "foo" -/
#guard_msgs in
#eval let ⟨v⟩ := task1; v
/-- info: "foo" -/
#guard_msgs in
#eval (task1.casesOn id : String)
def task2 : Task String := Task.pure "bar"
/-- info: "bar" -/
#guard_msgs in
#eval (task2.casesOn id : String)
/-- info: "bar" -/
#guard_msgs in
#eval let ⟨v⟩ := task2; v