lean4-htt/tests/lean/run/monad_error_problem.lean
2017-12-15 15:47:58 -08:00

27 lines
635 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.

namespace issue
universes u v w
class monad_error (ε : out_param $ Type u) (m : Type w → Type v) :=
[monad_m : monad m]
(fail : Π {α : Type w}, ε → m α)
set_option pp.all true
def unreachable {α} {m} [monad_error string m] : m α :=
monad_error.fail m "unreachable"
#check @unreachable
end issue
namespace original_issue
universes u v
class monad_error (ε : out_param $ Type u) (m : Type u → Type v) :=
[monad_m : monad m]
(fail : Π {α : Type u}, ε → m α)
set_option pp.all true
def unreachable {α} {m} [monad_error string m] : m α :=
monad_error.fail m "unreachable"
#check @unreachable
end original_issue