mirror of
https://github.com/edwinb/Idris2-boot.git
synced 2024-11-28 14:06:26 +03:00
bf67f5c87c
Also add some tests for totality checker
16 lines
316 B
Plaintext
16 lines
316 B
Plaintext
data Bad : Type where
|
|
MkBad : (Bad -> Int) -> Int -> Bad
|
|
MkBad' : Int -> Bad
|
|
|
|
foo : Bad -> Int
|
|
foo (MkBad f i) = f (MkBad' i)
|
|
foo (MkBad' x) = x
|
|
|
|
foo2 : Bad -> Int
|
|
foo2 b = case b of
|
|
MkBad f i => f (MkBad' i)
|
|
MkBad' x => x
|
|
|
|
data T : Type -> Type where
|
|
MkT : T (T a) -> T a
|