1
1
mirror of https://github.com/anoma/juvix.git synced 2024-12-15 01:52:11 +03:00
juvix/tests/positive/MiniC/MultiModules/Input.juvix
janmasrovira 803d2008d9
remove ≔ from the language and replace it by := (#1563)
* 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
2022-09-30 10:55:32 +10:00

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;