Idris2/tests/idris2/reg/reg015/anyfail.idr

22 lines
694 B
Idris
Raw Normal View History

data SimpleData = PtrAndSize AnyPtr Int
record Complicated where
constructor MkComplicated
simple : SimpleData
record MoreComplicated where
constructor MkMoreComplicated
something : Complicated
record EvenMoreComplicated where
constructor MkEvenMoreComplicated
somethingEven : MoreComplicated
data TooComplicatedToBeTrue : (something : EvenMoreComplicated) -> Type where
SomethingVeryComplicatedIs :
TooComplicatedToBeTrue
(MkEvenMoreComplicated (MkMoreComplicated (MkComplicated (PtrAndSize addr len))))
showing : (something : EvenMoreComplicated) -> (TooComplicatedToBeTrue something) -> Void
showing _ SomethingVeryComplicatedIs impossible