Idris2-boot/tests/idris2/reg015/anyfail.idr
Edwin Brady 69a7640a6e Allow flagging types as externally defined
e.g. in a C file. This means we don't accidentally treat things as
empty, since previously we just defined these as empty types, but that
broke coverage checking. Fixes #240
2020-04-10 11:45:52 +01:00

22 lines
697 B
Idris

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