lean4-htt/tests/lean/1861.lean
2017-11-06 19:15:57 -08:00

22 lines
385 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 int' := int
#eval id_rhs int' (-1 : )
-- #2147483647
instance : has_repr int' :=
by unfold int'; apply_instance
#eval id_rhs int' (-1 : )
-- -1
@[reducible] def int'' := int
/- Don't need to define has_repr instance for int'' because it is reducible -/
#eval id_rhs int'' (-1 : )
-- -1
inductive foo
| mk₁ : bool → foo
| mk₂ : bool → foo
#eval foo.mk₁ tt