-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0b3ffbd
commit a64733d
Showing
3 changed files
with
31 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
false | ||
true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
-- Mutually recursive let expressions | ||
module test039; | ||
|
||
open import Stdlib.Prelude; | ||
|
||
main : IO; | ||
main := | ||
let | ||
Ty : Type; | ||
Ty := Nat; | ||
odd : _; | ||
even : _; | ||
unused : _; | ||
odd zero := false; | ||
odd (suc n) := not (even n); | ||
unused := 123; | ||
even zero := true; | ||
even (suc n) := not (odd n); | ||
plusOne : Ty → Ty; | ||
plusOne n := n + 1; | ||
in printBoolLn (odd (plusOne 13)) | ||
>> printBoolLn (even (plusOne 12)); |