Idris2-boot/tests/idris2/reg014/casecase.idr
Edwin Brady 0daece1e0e Fix where under multiple cases
The names the locals were being applied to weren't being updated
properly, so applications of local functions inside case blocks were
sometimes given the wrong arguments. This is one of the few places where
it's hard to keep track of names in the type system! So naturally that'd
be where things go wrong I suppose...
2020-04-09 18:47:39 +01:00

12 lines
267 B
Idris

-- %logging 2
test : List a -> Nat -> Nat
test xs n
= case xs of
[] => Z
(y :: ys) => case n of
Z => Z
(S k) => calculate xs k
where
calculate : List a -> Nat -> Nat
%logging 0