Idris2/tests/idris2/total/total016/LazyPositivityCheck.idr
2023-09-07 14:57:22 +01:00

24 lines
436 B
Idris

%default total
failing "Oops is not total, not strictly positive"
data Oops : Type where
MkOops : (Lazy Oops -> Void) -> Oops
oops : Not (Lazy Oops)
oops a@(MkOops b) = b a
boom : Void
boom = oops (MkOops oops)
failing "Oops is not total, not strictly positive"
data Oops : Type where
MkOops : Lazy (Oops -> Void) -> Oops
oops : Not Oops
oops a@(MkOops b) = b a
boom : Void
boom = oops (MkOops oops)