mirror of
https://github.com/edwinb/Idris2-boot.git
synced 2024-12-18 18:31:43 +03:00
0daece1e0e
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...
12 lines
267 B
Idris
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
|