mirror of
https://github.com/anoma/juvix.git
synced 2024-12-15 18:13:56 +03:00
803d2008d9
* remove ≔ from the language and replace it by := * revert accidental changes in juvix input mode * update stdlib submodule * rename ℕ by Nat in the tests and examples * fix shell tests
30 lines
624 B
Plaintext
30 lines
624 B
Plaintext
module Input;
|
|
|
|
open import Data.String;
|
|
|
|
open import Data.Bool;
|
|
|
|
open import Data.Pair;
|
|
|
|
open import Data.IO;
|
|
|
|
-- Not needed but useful for testing
|
|
open import Prelude;
|
|
|
|
bool-to-str : Bool → String;
|
|
bool-to-str true := "True";
|
|
bool-to-str false := "False";
|
|
|
|
--------------------------------------------------------------------------------
|
|
-- Main
|
|
--------------------------------------------------------------------------------
|
|
|
|
fst-of-pair : Action;
|
|
fst-of-pair := (put-str "fst (True, False) = ")
|
|
>> put-str-ln (bool-to-str (fst Bool Bool (mkPair true false)));
|
|
|
|
main : Action;
|
|
main := fst-of-pair;
|
|
|
|
end;
|