Idris-dev/test/totality001/test010.idr
2014-01-30 17:24:08 +00:00

16 lines
277 B
Idris

data MyNat = MyO | MyS MyNat
%default total
data Bad = MkBad (Bad -> Int) Int
| MkBad' Int
vapp : Vect n a -> Vect m a -> Vect (n + m) a
vapp [] ys = ys
vapp (x :: xs) ys = x :: vapp xs ys
foo : Bad -> Int
foo (MkBad f i) = f (MkBad' i)
foo (MkBad' x) = x