mirror of
https://github.com/anoma/juvix.git
synced 2024-12-16 02:22:25 +03:00
3b3ea45da9
* Renaming MiniJuvix to Juvix * Make Ormolu happy * Make Hlint happy * Remove redundant imports * Fix shell tests and add target ci to our Makefile * Make pre-commit happy
29 lines
319 B
Plaintext
29 lines
319 B
Plaintext
module Data.Int;
|
|
|
|
open import Data.String;
|
|
|
|
axiom Int : Type;
|
|
compile Int {
|
|
c ↦ "int";
|
|
};
|
|
|
|
axiom intToStr : Int → String;
|
|
|
|
compile intToStr {
|
|
c ↦ "intToStr";
|
|
};
|
|
|
|
foreign c {
|
|
int plus(int l, int r) {
|
|
return l + r;
|
|
\}
|
|
};
|
|
|
|
infixl 6 +;
|
|
axiom + : Int -> Int -> Int;
|
|
compile + {
|
|
c ↦ "plus";
|
|
};
|
|
|
|
end;
|