1
1
mirror of https://github.com/anoma/juvix.git synced 2024-12-15 01:52:11 +03:00
juvix/tests/positive/MiniC/MultiModules/Data/Int.juvix

39 lines
423 B
Plaintext

module Data.Int;
open import Data.String;
axiom Int : Type;
compile Int {
c ↦ "int";
};
axiom Int_0 : Int;
compile Int_0 {
c ↦ "0";
};
axiom Int_1 : Int;
compile Int_1 {
c ↦ "1";
};
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;