Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszcz committed Sep 12, 2024
1 parent 02cbc6f commit 87fc7fe
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/Compilation/positive/out/test081.out
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0
18 changes: 18 additions & 0 deletions tests/Compilation/positive/test081.juvix
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
-- 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;

0 comments on commit 87fc7fe

Please sign in to comment.