Idris2/tests/idris2/linear006/ZFun.idr

14 lines
143 B
Idris
Raw Normal View History

import Data.Fin
foo : Fin 10
foo = 5
0 test : Fin k -> Nat
test i = k
0 baz : Nat
baz = test foo -- fine!
bar : Nat
bar = test foo -- bad!