lean4-htt/tests/lean/run/autoLift.lean
Kitamado 98e3d6f663
fix: make #check_failure's output be info (#6685)
This PR fixes the issue that `#check_failure`'s output is warning

Closes #6684
2025-01-18 07:27:44 +00:00

42 lines
629 B
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

def f : IO Nat := do
IO.println "foo"
return 0
abbrev M := StateRefT Nat IO
def g (a : Nat) : M Unit :=
pure ()
/--
info: id do
let a ← liftM f
g a : M Unit
-/
#guard_msgs in
#check id (α := M Unit) do let a ← f; g a
set_option autoLift false
set_option pp.mvars false in
/--
info: type mismatch
f
has type
IO Nat : Type
but is expected to have type
M ?_ : Type
---
info: id do
let a ← sorry
g a : M Unit
-/
#guard_msgs in
#check_failure id (α := M Unit) do let a ← f; g a
/--
info: id do
let a ← liftM f
g a : M Unit
-/
#guard_msgs in
#check id (α := M Unit) do let a ← liftM f; g a