unison/unison-src/tests/spurious-ability-fail.u

17 lines
415 B
Plaintext

--The expression in red needs the {𝛆} ability, but this location only has access to the {𝛆} ability,
--
-- 8 | odd n = if n == 1 then true else even2 (drop n 1)
use Universal ==
even : Nat -> Boolean
even n = if n == 0 then true else odd (drop n 1)
odd : Nat -> Boolean
odd n = if n == 1 then true else even2 (drop n 1)
even2 = even
increment : Nat -> Nat -- signature is optional
increment n = n + 1