1
1
mirror of https://github.com/anoma/juvix.git synced 2024-11-30 14:13:27 +03:00
juvix/tests/Compilation/positive/test081.juvix

19 lines
303 B
Plaintext

-- Non-duplication in let-folding
module test081;
import Stdlib.Prelude open;
{-# inline: false #-}
g (h : Nat -> Nat) : Nat := h 0 * h 0;
terminating
f (n : Nat) : Nat :=
if
| n == 0 := 0
| else :=
let terminating x := f (sub n 1)
in
g \{_ := x};
main : Nat := f 10000;