Idris2/tests/idris2/total/total016/LazyPositivityCheck.idr

24 lines
436 B
Idris
Raw Normal View History

%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)