diff --git a/gitlab-pages/docs/language-basics/cheat-sheet.md b/gitlab-pages/docs/language-basics/cheat-sheet.md
index c754d039f..a93cd6efd 100644
--- a/gitlab-pages/docs/language-basics/cheat-sheet.md
+++ b/gitlab-pages/docs/language-basics/cheat-sheet.md
@@ -17,7 +17,7 @@ title: Cheat Sheet
|Unit| `unit`|
|Boolean|
const hasDriversLicense: bool = False;
const adult: bool = True;
|
|Boolean Logic|(not True) == False == (False and True) == (False or False)
|
-|Mutez (micro tez)| `42mtz`, `7mtz` |
+|Mutez (micro tez)| `42mutez`, `7mutez` |
|Address | `"tz1KqTpEZ7Yob7QbPE4Hy4Wo8fHG8LhKxZSx"`, `"KT1JepfBfMSqkQyf9B1ndvURghGsSB8YCLMD"`|
|Addition |`3 + 4`, `3n + 4n`|
|Multiplication & Division| `3 * 4`, `3n * 4n`, `10 / 5`, `10n / 5n`|
@@ -35,11 +35,12 @@ title: Cheat Sheet
|Variants|type action is
| Increment of int
| Decrement of int
|
|Variant *(pattern)* matching|const a: action = Increment(5);
case a of
| Increment(n) -> n + 1
| Decrement(n) -> n - 1
end
|
|Records|type person is record
age: int ;
name: string ;
end
const john : person = record
age = 18;
name = "John Doe";
end
const name: string = john.name;
|
-|Maps|type prices is map(nat, tez);
const prices : prices = map
10n -> 60mtz;
50n -> 30mtz;
100n -> 10mtz;
end
const price: option(tez) = prices[50n];
prices[200n] := 5mtz;
|
+|Maps|type prices is map(nat, tez);
const prices : prices = map
10n -> 60mutez;
50n -> 30mutez;
100n -> 10mutez;
end
const price: option(tez) = prices[50n];
prices[200n] := 5mutez;
|
|Contracts & Accounts|const destinationAddress : address = "tz1...";
const contract : contract(unit) = get_contract(destinationAddress);
|
|Transactions|const payment : operation = transaction(unit, amount, receiver);
|
|Exception/Failure|`fail("Your descriptive error message for the user goes here.")`|
+
-
\ No newline at end of file
+
diff --git a/gitlab-pages/docs/language-basics/types.md b/gitlab-pages/docs/language-basics/types.md
index 957b6b6c8..501f77544 100644
--- a/gitlab-pages/docs/language-basics/types.md
+++ b/gitlab-pages/docs/language-basics/types.md
@@ -31,7 +31,7 @@ const dogBreed: animalBreed = "Saluki";
type accountBalances is map(address, tez);
const ledger: accountBalances = map
- ("tz1KqTpEZ7Yob7QbPE4Hy4Wo8fHG8LhKxZSx": address) -> 10mtz
+ ("tz1KqTpEZ7Yob7QbPE4Hy4Wo8fHG8LhKxZSx": address) -> 10mutez
end
```
@@ -60,10 +60,10 @@ end
type accountBalances is map(account, accountData);
// pseudo-JSON representation of our map
-// { "tz1...": {balance: 10mtz, numberOfTransactions: 5n} }
+// { "tz1...": {balance: 10mutez, numberOfTransactions: 5n} }
const ledger: accountBalances = map
("tz1KqTpEZ7Yob7QbPE4Hy4Wo8fHG8LhKxZSx": address) -> record
- balance = 10mtz;
+ balance = 10mutez;
numberOfTransactions = 5n;
end
end
diff --git a/gitlab-pages/docs/tutorials/get-started/tezos-taco-shop-payout.md b/gitlab-pages/docs/tutorials/get-started/tezos-taco-shop-payout.md
index f0d70fe4a..ffc6e5687 100644
--- a/gitlab-pages/docs/tutorials/get-started/tezos-taco-shop-payout.md
+++ b/gitlab-pages/docs/tutorials/get-started/tezos-taco-shop-payout.md
@@ -134,11 +134,11 @@ To confirm that our contract is valid, we can dry run it. As a result we see a *
ligo dry-run taco-shop.ligo --syntax pascaligo --amount 1 buy_taco 1n "map
1n -> record
current_stock = 50n;
- max_price = 50000000mtz;
+ max_price = 50000000mutez;
end;
2n -> record
current_stock = 20n;
- max_price = 75000000mtz;
+ max_price = 75000000mutez;
end;
end"
```
diff --git a/gitlab-pages/docs/tutorials/get-started/tezos-taco-shop-smart-contract.md b/gitlab-pages/docs/tutorials/get-started/tezos-taco-shop-smart-contract.md
index 8dadb49cd..59ea39198 100644
--- a/gitlab-pages/docs/tutorials/get-started/tezos-taco-shop-smart-contract.md
+++ b/gitlab-pages/docs/tutorials/get-started/tezos-taco-shop-smart-contract.md
@@ -28,8 +28,8 @@ Each taco kind, has its own `max_price` that it sells for, and a finite supply f
|**kind** |id |**available_stock**| **max_price**|
|---|---|---|---|
-|el clásico | `1n` | `50n` | `50000000mtz` |
-|especial del chef | `2n` | `20n` | `75000000mtz` |
+|el clásico | `1n` | `50n` | `50000000mutez` |
+|especial del chef | `2n` | `20n` | `75000000mutez` |
### Calculating the current purchase price
@@ -42,16 +42,16 @@ current_purchase_price = max_price / available_stock
#### El clásico
|**available_stock**|**max_price**|**current_purchase_price**|
|---|---|---|
-| `50n` | `50000000mtz` | `1tz`|
-| `20n` | `50000000mtz` | `2.5tz` |
-| `5n` | `50000000mtz` | `10tz` |
+| `50n` | `50000000mutez` | `1tz`|
+| `20n` | `50000000mutez` | `2.5tz` |
+| `5n` | `50000000mutez` | `10tz` |
#### Especial del chef
|**available_stock**|**max_price**|**current_purchase_price**|
|---|---|---|
-| `20n` | `75000000mtz` | `3.75tz` |
-| `10n` | `75000000mtz` | `7.5tz`|
-| `5n` | `75000000mtz` | `15tz` |
+| `20n` | `75000000mutez` | `3.75tz` |
+| `10n` | `75000000mutez` | `7.5tz`|
+| `5n` | `75000000mutez` | `15tz` |
---
@@ -161,11 +161,11 @@ When dry-running a contract, it's crucial to provide a correct initial storage v
map
1n -> record
current_stock = 50n;
- max_price = 50000000mtz;
+ max_price = 50000000mutez;
end;
2n -> record
current_stock = 20n;
- max_price = 75000000mtz;
+ max_price = 75000000mutez;
end;
end
```
@@ -177,11 +177,11 @@ end
ligo dry-run taco-shop.ligo --syntax pascaligo main unit "map
1n -> record
current_stock = 50n;
- max_price = 50000000mtz;
+ max_price = 50000000mutez;
end;
2n -> record
current_stock = 20n;
- max_price = 75000000mtz;
+ max_price = 75000000mutez;
end;
end"
```
@@ -298,11 +298,11 @@ In order to test the `amount` sent, we'll use the `--amount` option of `dry-run`
ligo dry-run taco-shop.ligo --syntax pascaligo --amount 1 buy_taco 1n "map
1n -> record
current_stock = 50n;
- max_price = 50000000mtz;
+ max_price = 50000000mutez;
end;
2n -> record
current_stock = 20n;
- max_price = 75000000mtz;
+ max_price = 75000000mutez;
end;
end"
```
diff --git a/src/passes/1-parser/ligodity/AST.ml b/src/passes/1-parser/ligodity/AST.ml
index ae4729117..94c26b736 100644
--- a/src/passes/1-parser/ligodity/AST.ml
+++ b/src/passes/1-parser/ligodity/AST.ml
@@ -260,7 +260,7 @@ and arith_expr =
| Neg of minus un_op reg
| Int of (string * Z.t) reg
| Nat of (string * Z.t) reg
-| Mtz of (string * Z.t) reg
+| Mutez of (string * Z.t) reg
and logic_expr =
BoolExpr of bool_expr
@@ -391,7 +391,7 @@ let logic_expr_to_region = function
let arith_expr_to_region = function
Add {region;_} | Sub {region;_} | Mult {region;_}
| Div {region;_} | Mod {region;_} | Neg {region;_}
-| Int {region;_} | Mtz {region; _}
+| Int {region;_} | Mutez {region; _}
| Nat {region; _} -> region
let string_expr_to_region = function
diff --git a/src/passes/1-parser/ligodity/AST.mli b/src/passes/1-parser/ligodity/AST.mli
index 3e4001536..39eed2441 100644
--- a/src/passes/1-parser/ligodity/AST.mli
+++ b/src/passes/1-parser/ligodity/AST.mli
@@ -265,7 +265,7 @@ and arith_expr =
| Neg of minus un_op reg (* -e *)
| Int of (string * Z.t) reg (* 12345 *)
| Nat of (string * Z.t) reg (* 3p *)
-| Mtz of (string * Z.t) reg (* 1.00tz 3tz *)
+| Mutez of (string * Z.t) reg (* 1.00tz 3tz *)
and logic_expr =
BoolExpr of bool_expr
diff --git a/src/passes/1-parser/ligodity/LexToken.mli b/src/passes/1-parser/ligodity/LexToken.mli
index ea4f0a6ad..b58bcece1 100644
--- a/src/passes/1-parser/ligodity/LexToken.mli
+++ b/src/passes/1-parser/ligodity/LexToken.mli
@@ -82,7 +82,7 @@ type t =
| Constr of string Region.reg
| Int of (string * Z.t) Region.reg
| Nat of (string * Z.t) Region.reg
-| Mtz of (string * Z.t) Region.reg
+| Mutez of (string * Z.t) Region.reg
| Str of string Region.reg
| Bytes of (string * Hex.t) Region.reg
@@ -145,7 +145,7 @@ type sym_err = Invalid_symbol
val mk_int : lexeme -> Region.t -> (token, int_err) result
val mk_nat : lexeme -> Region.t -> (token, nat_err) result
-val mk_mtz : lexeme -> Region.t -> (token, int_err) result
+val mk_mutez : lexeme -> Region.t -> (token, int_err) result
val mk_ident : lexeme -> Region.t -> (token, ident_err) result
val mk_sym : lexeme -> Region.t -> (token, sym_err) result
val mk_string : lexeme -> Region.t -> token
diff --git a/src/passes/1-parser/ligodity/LexToken.mll b/src/passes/1-parser/ligodity/LexToken.mll
index 2c437d15c..e286ff245 100644
--- a/src/passes/1-parser/ligodity/LexToken.mll
+++ b/src/passes/1-parser/ligodity/LexToken.mll
@@ -64,7 +64,7 @@ type t =
| Constr of string Region.reg
| Int of (string * Z.t) Region.reg
| Nat of (string * Z.t) Region.reg
-| Mtz of (string * Z.t) Region.reg
+| Mutez of (string * Z.t) Region.reg
| Str of string Region.reg
| Bytes of (string * Hex.t) Region.reg
@@ -141,8 +141,8 @@ let proj_token = function
region, sprintf "Int (\"%s\", %s)" s (Z.to_string n)
| Nat Region.{region; value = s,n} ->
region, sprintf "Nat (\"%s\", %s)" s (Z.to_string n)
- | Mtz Region.{region; value = s,n} ->
- region, sprintf "Mtz (\"%s\", %s)" s (Z.to_string n)
+ | Mutez Region.{region; value = s,n} ->
+ region, sprintf "Mutez (\"%s\", %s)" s (Z.to_string n)
| Str Region.{region; value} ->
region, sprintf "Str %s" value
| Bytes Region.{region; value = s,b} ->
@@ -202,7 +202,7 @@ let to_lexeme = function
| Constr id -> id.Region.value
| Int i
| Nat i
- | Mtz i -> fst i.Region.value
+ | Mutez i -> fst i.Region.value
| Str s -> s.Region.value
| Bytes b -> fst b.Region.value
| Begin _ -> "begin"
@@ -396,14 +396,14 @@ let mk_nat lexeme region =
else Ok (Nat Region.{region; value = lexeme, z})
)
-let mk_mtz lexeme region =
+let mk_mutez lexeme region =
let z =
Str.(global_replace (regexp "_") "" lexeme) |>
- Str.(global_replace (regexp "mtz") "") |>
+ Str.(global_replace (regexp "mutez") "") |>
Z.of_string in
- if Z.equal z Z.zero && lexeme <> "0mtz"
+ if Z.equal z Z.zero && lexeme <> "0mutez"
then Error Non_canonical_zero
- else Ok (Mtz Region.{region; value = lexeme, z})
+ else Ok (Mutez Region.{region; value = lexeme, z})
let eof region = EOF region
diff --git a/src/passes/1-parser/ligodity/ParToken.mly b/src/passes/1-parser/ligodity/ParToken.mly
index 342f36953..b64d1ca3a 100644
--- a/src/passes/1-parser/ligodity/ParToken.mly
+++ b/src/passes/1-parser/ligodity/ParToken.mly
@@ -42,7 +42,7 @@
%token <(string * Z.t) Region.reg> Int
%token <(string * Z.t) Region.reg> Nat
-%token <(string * Z.t) Region.reg> Mtz
+%token <(string * Z.t) Region.reg> Mutez
(*%token And*)
%token Begin
diff --git a/src/passes/1-parser/ligodity/Parser.mly b/src/passes/1-parser/ligodity/Parser.mly
index 0c8a5fbac..be1baced3 100644
--- a/src/passes/1-parser/ligodity/Parser.mly
+++ b/src/passes/1-parser/ligodity/Parser.mly
@@ -761,7 +761,7 @@ call_expr:
core_expr:
Int { EArith (Int $1) }
-| Mtz { EArith (Mtz $1) }
+| Mutez { EArith (Mutez $1) }
| Nat { EArith (Nat $1) }
| Ident | module_field { EVar $1 }
| projection { EProj $1 }
diff --git a/src/passes/1-parser/ligodity/ParserLog.ml b/src/passes/1-parser/ligodity/ParserLog.ml
index 299b2a392..29c13e6ad 100644
--- a/src/passes/1-parser/ligodity/ParserLog.ml
+++ b/src/passes/1-parser/ligodity/ParserLog.ml
@@ -321,8 +321,8 @@ and print_arith_expr buffer = function
| Int {region; value=lex,z} ->
let line = sprintf "Int %s (%s)" lex (Z.to_string z)
in print_token buffer region line
-| Mtz {region; value=lex,z} ->
- let line = sprintf "Mtz %s (%s)" lex (Z.to_string z)
+| Mutez {region; value=lex,z} ->
+ let line = sprintf "Mutez %s (%s)" lex (Z.to_string z)
in print_token buffer region line
| Nat {region; value=lex,z} ->
let line = sprintf "Nat %s (%s)" lex (Z.to_string z)
diff --git a/src/passes/1-parser/pascaligo/AST.ml b/src/passes/1-parser/pascaligo/AST.ml
index dad883dc1..14d2e02e1 100644
--- a/src/passes/1-parser/pascaligo/AST.ml
+++ b/src/passes/1-parser/pascaligo/AST.ml
@@ -547,7 +547,7 @@ and arith_expr =
| Neg of minus un_op reg
| Int of (Lexer.lexeme * Z.t) reg
| Nat of (Lexer.lexeme * Z.t) reg
-| Mtz of (Lexer.lexeme * Z.t) reg
+| Mutez of (Lexer.lexeme * Z.t) reg
and string_expr =
Cat of cat bin_op reg
@@ -689,7 +689,7 @@ and arith_expr_to_region = function
| Neg {region; _}
| Int {region; _}
| Nat {region; _}
-| Mtz {region; _} -> region
+| Mutez {region; _} -> region
and string_expr_to_region = function
Cat {region; _}
diff --git a/src/passes/1-parser/pascaligo/AST.mli b/src/passes/1-parser/pascaligo/AST.mli
index e3509c1d7..418d422d3 100644
--- a/src/passes/1-parser/pascaligo/AST.mli
+++ b/src/passes/1-parser/pascaligo/AST.mli
@@ -538,7 +538,7 @@ and arith_expr =
| Neg of minus un_op reg
| Int of (Lexer.lexeme * Z.t) reg
| Nat of (Lexer.lexeme * Z.t) reg
-| Mtz of (Lexer.lexeme * Z.t) reg
+| Mutez of (Lexer.lexeme * Z.t) reg
and string_expr =
Cat of cat bin_op reg
diff --git a/src/passes/1-parser/pascaligo/Doc/pascaligo.md b/src/passes/1-parser/pascaligo/Doc/pascaligo.md
index 8680138a8..5bb9044c3 100644
--- a/src/passes/1-parser/pascaligo/Doc/pascaligo.md
+++ b/src/passes/1-parser/pascaligo/Doc/pascaligo.md
@@ -340,10 +340,10 @@ and the canonical form of zero is `0n`.
* The last kind of native numerical type is `tez`, which is a unit of
measure of the amounts (fees, accounts). Beware: the literals of the
-type `tez` are annotated with the suffix `mtz`, which stands for
-millionth of Tez, for instance, `0mtz` or `1200000mtz`. The same handy
-use of underscores as in natural literals help in the writing, like
-`1_200_000mtz`.
+type `tez` are annotated with the suffix `mutez`, which stands for
+millionth of Tez, for instance, `0mutez` or `1200000mutez`. The same
+handy use of underscores as in natural literals help in the writing,
+like `1_200_000mutez`.
To see how numerical types can be used in expressions see the sections
"Predefined operators" and "Predefined values".
@@ -832,7 +832,7 @@ example, in verbose style:
A value of that type could be
record
- goal = 10mtz;
+ goal = 10mutez;
deadline = "...";
backers = map end;
funded = False
diff --git a/src/passes/1-parser/pascaligo/Doc/pascaligo_01.bnf b/src/passes/1-parser/pascaligo/Doc/pascaligo_01.bnf
index d7c05f76d..169764eff 100644
--- a/src/passes/1-parser/pascaligo/Doc/pascaligo_01.bnf
+++ b/src/passes/1-parser/pascaligo/Doc/pascaligo_01.bnf
@@ -331,7 +331,7 @@ unary_expr ::=
core_expr ::=
Int
| Nat
-| Mtz
+| Mutez
| var
| String
| Bytes
diff --git a/src/passes/1-parser/pascaligo/Doc/pascaligo_02.bnf b/src/passes/1-parser/pascaligo/Doc/pascaligo_02.bnf
index a8fd7f688..7abf65aa1 100644
--- a/src/passes/1-parser/pascaligo/Doc/pascaligo_02.bnf
+++ b/src/passes/1-parser/pascaligo/Doc/pascaligo_02.bnf
@@ -337,7 +337,7 @@ unary_expr ::=
core_expr ::=
Int
| Nat
-| Mtz
+| Mutez
| var
| String
| Bytes
diff --git a/src/passes/1-parser/pascaligo/Doc/pascaligo_03.bnf b/src/passes/1-parser/pascaligo/Doc/pascaligo_03.bnf
index f7893cf6d..bc52b864d 100644
--- a/src/passes/1-parser/pascaligo/Doc/pascaligo_03.bnf
+++ b/src/passes/1-parser/pascaligo/Doc/pascaligo_03.bnf
@@ -317,7 +317,7 @@ unary_expr ::=
core_expr ::=
Int
| Nat
-| Mtz
+| Mutez
| Ident (* var *)
| String
| Bytes
diff --git a/src/passes/1-parser/pascaligo/Doc/pascaligo_04.bnf b/src/passes/1-parser/pascaligo/Doc/pascaligo_04.bnf
index 5f344787a..dac66db62 100644
--- a/src/passes/1-parser/pascaligo/Doc/pascaligo_04.bnf
+++ b/src/passes/1-parser/pascaligo/Doc/pascaligo_04.bnf
@@ -295,7 +295,7 @@ unary_expr ::=
core_expr ::=
Int
| Nat
-| Mtz
+| Mutez
| Ident (* var *)
| String
| Bytes
diff --git a/src/passes/1-parser/pascaligo/Doc/pascaligo_05.bnf b/src/passes/1-parser/pascaligo/Doc/pascaligo_05.bnf
index d88b74f78..9dd951d94 100644
--- a/src/passes/1-parser/pascaligo/Doc/pascaligo_05.bnf
+++ b/src/passes/1-parser/pascaligo/Doc/pascaligo_05.bnf
@@ -289,7 +289,7 @@ unary_expr ::=
core_expr ::=
Int
| Nat
-| Mtz
+| Mutez
| Ident (* var *)
| String
| Bytes
diff --git a/src/passes/1-parser/pascaligo/Doc/pascaligo_06.bnf b/src/passes/1-parser/pascaligo/Doc/pascaligo_06.bnf
index f16a91dba..cd4c7751d 100644
--- a/src/passes/1-parser/pascaligo/Doc/pascaligo_06.bnf
+++ b/src/passes/1-parser/pascaligo/Doc/pascaligo_06.bnf
@@ -292,7 +292,7 @@ unary_expr ::=
core_expr ::=
Int
| Nat
-| Mtz
+| Mutez
| Ident (* var *)
| String
| Bytes
diff --git a/src/passes/1-parser/pascaligo/Doc/pascaligo_07.bnf b/src/passes/1-parser/pascaligo/Doc/pascaligo_07.bnf
index a6d801368..d972db4ae 100644
--- a/src/passes/1-parser/pascaligo/Doc/pascaligo_07.bnf
+++ b/src/passes/1-parser/pascaligo/Doc/pascaligo_07.bnf
@@ -279,7 +279,7 @@ unary_expr ::=
core_expr ::=
Int
| Nat
-| Mtz
+| Mutez
| Ident (* var *)
| String
| Bytes
diff --git a/src/passes/1-parser/pascaligo/Doc/pascaligo_08.bnf b/src/passes/1-parser/pascaligo/Doc/pascaligo_08.bnf
index f459f2193..5d3bbe886 100644
--- a/src/passes/1-parser/pascaligo/Doc/pascaligo_08.bnf
+++ b/src/passes/1-parser/pascaligo/Doc/pascaligo_08.bnf
@@ -284,7 +284,7 @@ unary_expr ::=
core_expr ::=
Int
| Nat
-| Mtz
+| Mutez
| Ident (* var *)
| String
| Bytes
diff --git a/src/passes/1-parser/pascaligo/Doc/pascaligo_09.bnf b/src/passes/1-parser/pascaligo/Doc/pascaligo_09.bnf
index 0b15db3ac..1576befbc 100644
--- a/src/passes/1-parser/pascaligo/Doc/pascaligo_09.bnf
+++ b/src/passes/1-parser/pascaligo/Doc/pascaligo_09.bnf
@@ -288,7 +288,7 @@ unary_expr ::=
core_expr ::=
Int
| Nat
-| Mtz
+| Mutez
| Ident (* var *)
| String
| Bytes
diff --git a/src/passes/1-parser/pascaligo/Doc/pascaligo_10.bnf b/src/passes/1-parser/pascaligo/Doc/pascaligo_10.bnf
index ae956b3c7..b167eb01a 100644
--- a/src/passes/1-parser/pascaligo/Doc/pascaligo_10.bnf
+++ b/src/passes/1-parser/pascaligo/Doc/pascaligo_10.bnf
@@ -283,7 +283,7 @@ unary_expr ::=
core_expr ::=
Int
| Nat
-| Mtz
+| Mutez
| Ident (* var *)
| String
| Bytes
diff --git a/src/passes/1-parser/pascaligo/Doc/pascaligo_11.bnf b/src/passes/1-parser/pascaligo/Doc/pascaligo_11.bnf
index 569b16392..ede2ceacd 100644
--- a/src/passes/1-parser/pascaligo/Doc/pascaligo_11.bnf
+++ b/src/passes/1-parser/pascaligo/Doc/pascaligo_11.bnf
@@ -281,7 +281,7 @@ unary_expr ::=
core_expr ::=
Int
| Nat
-| Mtz
+| Mutez
| Ident (* var *)
| Ident (* var *) brackets(expr) (* lookup *)
| Ident (* struct_name *) DOT nsepseq(selection,DOT) brackets(expr) (* lookup *)
diff --git a/src/passes/1-parser/pascaligo/Doc/pascaligo_12.bnf b/src/passes/1-parser/pascaligo/Doc/pascaligo_12.bnf
index 47c399337..bded0f013 100644
--- a/src/passes/1-parser/pascaligo/Doc/pascaligo_12.bnf
+++ b/src/passes/1-parser/pascaligo/Doc/pascaligo_12.bnf
@@ -285,7 +285,7 @@ unary_expr ::=
core_expr ::=
Int
| Nat
-| Mtz
+| Mutez
| Ident (* var *)
| Ident (* var *) brackets(expr) (* lookup *)
| Ident (* struct_name *) DOT nsepseq(selection,DOT) option(brackets(expr))
diff --git a/src/passes/1-parser/pascaligo/Doc/pascaligo_13.bnf b/src/passes/1-parser/pascaligo/Doc/pascaligo_13.bnf
index 7b8146e1c..52ac22ba0 100644
--- a/src/passes/1-parser/pascaligo/Doc/pascaligo_13.bnf
+++ b/src/passes/1-parser/pascaligo/Doc/pascaligo_13.bnf
@@ -285,7 +285,7 @@ unary_expr ::=
core_expr ::=
Int
| Nat
-| Mtz
+| Mutez
| Ident (* var *)
| Ident (* var *) brackets(expr) (* lookup *)
| Ident (* struct_name *) DOT nsepseq(selection,DOT) option(brackets(expr))
diff --git a/src/passes/1-parser/pascaligo/Doc/pascaligo_14.bnf b/src/passes/1-parser/pascaligo/Doc/pascaligo_14.bnf
index 4973e59b6..69a710b79 100644
--- a/src/passes/1-parser/pascaligo/Doc/pascaligo_14.bnf
+++ b/src/passes/1-parser/pascaligo/Doc/pascaligo_14.bnf
@@ -285,7 +285,7 @@ unary_expr ::=
core_expr ::=
Int
| Nat
-| Mtz
+| Mutez
| Ident (* var *)
| Ident (* var *) brackets(expr) (* lookup *)
| Ident (* struct_name *) DOT nsepseq(selection,DOT) option(brackets(expr))
diff --git a/src/passes/1-parser/pascaligo/Doc/pascaligo_15.bnf b/src/passes/1-parser/pascaligo/Doc/pascaligo_15.bnf
index 3f26f6494..b3713e285 100644
--- a/src/passes/1-parser/pascaligo/Doc/pascaligo_15.bnf
+++ b/src/passes/1-parser/pascaligo/Doc/pascaligo_15.bnf
@@ -285,7 +285,7 @@ unary_expr ::=
core_expr ::=
Int
| Nat
-| Mtz
+| Mutez
| Ident (* var *)
| Ident (* var *) brackets(expr) (* lookup *)
| Ident (* struct_name *) DOT nsepseq(selection,DOT) option(brackets(expr))
diff --git a/src/passes/1-parser/pascaligo/Doc/pascaligo_16.bnf b/src/passes/1-parser/pascaligo/Doc/pascaligo_16.bnf
index ab6844335..e50db4584 100644
--- a/src/passes/1-parser/pascaligo/Doc/pascaligo_16.bnf
+++ b/src/passes/1-parser/pascaligo/Doc/pascaligo_16.bnf
@@ -285,7 +285,7 @@ unary_expr ::=
core_expr ::=
Int
| Nat
-| Mtz
+| Mutez
| Ident (* var *)
| Ident (* var *) brackets(expr) (* lookup *)
| Ident (* struct_name *) DOT nsepseq(selection,DOT) option(brackets(expr))
diff --git a/src/passes/1-parser/pascaligo/Doc/pascaligo_17.bnf b/src/passes/1-parser/pascaligo/Doc/pascaligo_17.bnf
index 7a1f4c926..09cefcc77 100644
--- a/src/passes/1-parser/pascaligo/Doc/pascaligo_17.bnf
+++ b/src/passes/1-parser/pascaligo/Doc/pascaligo_17.bnf
@@ -285,7 +285,7 @@ unary_expr ::=
core_expr ::=
Int
| Nat
-| Mtz
+| Mutez
| Ident (* var *)
| Ident (* var *) brackets(expr) (* lookup *)
| Ident (* struct_name *) DOT nsepseq(selection,DOT) option(brackets(expr))
diff --git a/src/passes/1-parser/pascaligo/Doc/pascaligo_18.bnf b/src/passes/1-parser/pascaligo/Doc/pascaligo_18.bnf
index 6d7911a23..0cd754062 100644
--- a/src/passes/1-parser/pascaligo/Doc/pascaligo_18.bnf
+++ b/src/passes/1-parser/pascaligo/Doc/pascaligo_18.bnf
@@ -285,7 +285,7 @@ unary_expr ::=
core_expr ::=
Int
| Nat
-| Mtz
+| Mutez
| Ident (* var *)
| Ident (* var *) brackets(expr) (* lookup *)
| Ident (* struct_name *) DOT nsepseq(selection,DOT) option(brackets(expr))
diff --git a/src/passes/1-parser/pascaligo/Doc/pascaligo_19.bnf b/src/passes/1-parser/pascaligo/Doc/pascaligo_19.bnf
index 937290d18..8ca3db982 100644
--- a/src/passes/1-parser/pascaligo/Doc/pascaligo_19.bnf
+++ b/src/passes/1-parser/pascaligo/Doc/pascaligo_19.bnf
@@ -285,7 +285,7 @@ unary_expr ::=
core_expr ::=
Int
| Nat
-| Mtz
+| Mutez
| Ident (* var *)
| Ident (* var *) brackets(expr) (* lookup *)
| Ident (* struct_name *) DOT nsepseq(selection,DOT) option(brackets(expr))
diff --git a/src/passes/1-parser/pascaligo/Doc/pascaligo_20.bnf b/src/passes/1-parser/pascaligo/Doc/pascaligo_20.bnf
index 3afe57b98..cdb3cb15a 100644
--- a/src/passes/1-parser/pascaligo/Doc/pascaligo_20.bnf
+++ b/src/passes/1-parser/pascaligo/Doc/pascaligo_20.bnf
@@ -270,7 +270,7 @@ unary_expr ::=
core_expr ::=
Int
| Nat
-| Mtz
+| Mutez
| Ident (* var *)
| Ident (* var *) brackets(expr) (* lookup *)
| Ident (* struct_name *) DOT nsepseq(selection,DOT) option(brackets(expr))
diff --git a/src/passes/1-parser/pascaligo/Doc/pascaligo_21.bnf b/src/passes/1-parser/pascaligo/Doc/pascaligo_21.bnf
index d99ef835b..a9a825601 100644
--- a/src/passes/1-parser/pascaligo/Doc/pascaligo_21.bnf
+++ b/src/passes/1-parser/pascaligo/Doc/pascaligo_21.bnf
@@ -291,7 +291,7 @@ unary_expr ::=
core_expr ::=
Int
| Nat
-| Mtz
+| Mutez
| Ident option(core_suffix)
| String
| Bytes
diff --git a/src/passes/1-parser/pascaligo/Doc/pascaligo_22.bnf b/src/passes/1-parser/pascaligo/Doc/pascaligo_22.bnf
index 6eb0e8dc1..93924bb5c 100644
--- a/src/passes/1-parser/pascaligo/Doc/pascaligo_22.bnf
+++ b/src/passes/1-parser/pascaligo/Doc/pascaligo_22.bnf
@@ -349,7 +349,7 @@ XXX
core_expr ::=
Int
| Nat
-| Mtz
+| Mutez
| Ident option(core_suffix)
| String
| Bytes
diff --git a/src/passes/1-parser/pascaligo/LexToken.mli b/src/passes/1-parser/pascaligo/LexToken.mli
index 1f94e166f..f569dc6a2 100644
--- a/src/passes/1-parser/pascaligo/LexToken.mli
+++ b/src/passes/1-parser/pascaligo/LexToken.mli
@@ -35,7 +35,7 @@ type t =
| Bytes of (lexeme * Hex.t) Region.reg
| Int of (lexeme * Z.t) Region.reg
| Nat of (lexeme * Z.t) Region.reg
-| Mtz of (lexeme * Z.t) Region.reg
+| Mutez of (lexeme * Z.t) Region.reg
| Ident of lexeme Region.reg
| Constr of lexeme Region.reg
@@ -145,7 +145,7 @@ type sym_err = Invalid_symbol
val mk_int : lexeme -> Region.t -> (token, int_err) result
val mk_nat : lexeme -> Region.t -> (token, nat_err) result
-val mk_mtz : lexeme -> Region.t -> (token, int_err) result
+val mk_mutez : lexeme -> Region.t -> (token, int_err) result
val mk_ident : lexeme -> Region.t -> (token, ident_err) result
val mk_sym : lexeme -> Region.t -> (token, sym_err) result
val mk_string : lexeme -> Region.t -> token
diff --git a/src/passes/1-parser/pascaligo/LexToken.mll b/src/passes/1-parser/pascaligo/LexToken.mll
index c27abbb12..44922ee8c 100644
--- a/src/passes/1-parser/pascaligo/LexToken.mll
+++ b/src/passes/1-parser/pascaligo/LexToken.mll
@@ -33,7 +33,7 @@ type t =
| Bytes of (lexeme * Hex.t) Region.reg
| Int of (lexeme * Z.t) Region.reg
| Nat of (lexeme * Z.t) Region.reg
-| Mtz of (lexeme * Z.t) Region.reg
+| Mutez of (lexeme * Z.t) Region.reg
| Ident of lexeme Region.reg
| Constr of lexeme Region.reg
@@ -160,8 +160,8 @@ let proj_token = function
| Nat Region.{region; value = s,n} ->
region, sprintf "Nat (\"%s\", %s)" s (Z.to_string n)
-| Mtz Region.{region; value = s,n} ->
- region, sprintf "Mtz (\"%s\", %s)" s (Z.to_string n)
+| Mutez Region.{region; value = s,n} ->
+ region, sprintf "Mutez (\"%s\", %s)" s (Z.to_string n)
| Ident Region.{region; value} ->
region, sprintf "Ident \"%s\"" value
@@ -258,7 +258,7 @@ let to_lexeme = function
| Bytes b -> fst b.Region.value
| Int i
| Nat i
-| Mtz i -> fst i.Region.value
+| Mutez i -> fst i.Region.value
| Ident id
| Constr id -> id.Region.value
@@ -497,14 +497,14 @@ let mk_nat lexeme region =
else Ok (Nat Region.{region; value = lexeme, z})
)
-let mk_mtz lexeme region =
+let mk_mutez lexeme region =
let z =
Str.(global_replace (regexp "_") "" lexeme) |>
- Str.(global_replace (regexp "mtz") "") |>
+ Str.(global_replace (regexp "mutez") "") |>
Z.of_string in
- if Z.equal z Z.zero && lexeme <> "0mtz"
+ if Z.equal z Z.zero && lexeme <> "0mutez"
then Error Non_canonical_zero
- else Ok (Mtz Region.{region; value = lexeme, z})
+ else Ok (Mutez Region.{region; value = lexeme, z})
let eof region = EOF region
diff --git a/src/passes/1-parser/pascaligo/ParToken.mly b/src/passes/1-parser/pascaligo/ParToken.mly
index c236def9e..9d3d14e10 100644
--- a/src/passes/1-parser/pascaligo/ParToken.mly
+++ b/src/passes/1-parser/pascaligo/ParToken.mly
@@ -9,7 +9,7 @@
%token <(LexToken.lexeme * Hex.t) Region.reg> Bytes
%token <(LexToken.lexeme * Z.t) Region.reg> Int
%token <(LexToken.lexeme * Z.t) Region.reg> Nat
-%token <(LexToken.lexeme * Z.t) Region.reg> Mtz
+%token <(LexToken.lexeme * Z.t) Region.reg> Mutez
%token Ident
%token Constr
diff --git a/src/passes/1-parser/pascaligo/Parser.mly b/src/passes/1-parser/pascaligo/Parser.mly
index fb70ac8f8..a23fb5e9a 100644
--- a/src/passes/1-parser/pascaligo/Parser.mly
+++ b/src/passes/1-parser/pascaligo/Parser.mly
@@ -856,7 +856,7 @@ unary_expr:
core_expr:
Int { EArith (Int $1) }
| Nat { EArith (Nat $1) }
-| Mtz { EArith (Mtz $1) }
+| Mutez { EArith (Mutez $1) }
| var { EVar $1 }
| String { EString (String $1) }
| Bytes { EBytes $1 }
diff --git a/src/passes/1-parser/pascaligo/ParserLog.ml b/src/passes/1-parser/pascaligo/ParserLog.ml
index 6127b79d3..c6940bdee 100644
--- a/src/passes/1-parser/pascaligo/ParserLog.ml
+++ b/src/passes/1-parser/pascaligo/ParserLog.ml
@@ -527,7 +527,7 @@ and print_arith_expr buffer = function
print_expr buffer arg
| Int i
| Nat i
-| Mtz i -> print_int buffer i
+| Mutez i -> print_int buffer i
and print_string_expr buffer = function
Cat {value = {arg1; op; arg2}; _} ->
@@ -1391,8 +1391,8 @@ and pp_arith_expr buffer ~pad:(_,pc as pad) = function
| Nat {value; _} ->
pp_node buffer ~pad "Nat";
pp_int buffer ~pad value
-| Mtz {value; _} ->
- pp_node buffer ~pad "Mtz";
+| Mutez {value; _} ->
+ pp_node buffer ~pad "Mutez";
pp_int buffer ~pad value
and pp_set_expr buffer ~pad:(_,pc as pad) = function
diff --git a/src/passes/1-parser/pascaligo/SParser.ml b/src/passes/1-parser/pascaligo/SParser.ml
index faa9780ed..70dc5166b 100644
--- a/src/passes/1-parser/pascaligo/SParser.ml
+++ b/src/passes/1-parser/pascaligo/SParser.ml
@@ -312,7 +312,7 @@ and unary_expr = parser
and core_expr = parser
[< 'Int _ >] -> ()
| [< 'Nat _ >] -> ()
-| [< 'Mtz _ >] -> ()
+| [< 'Mutez _ >] -> ()
| [< 'Ident _; _ = opt core_suffix >] -> ()
| [< 'String _ >] -> ()
| [< 'Bytes _ >] -> ()
diff --git a/src/passes/1-parser/shared/Lexer.mli b/src/passes/1-parser/shared/Lexer.mli
index 8f56ac87e..cc0359998 100644
--- a/src/passes/1-parser/shared/Lexer.mli
+++ b/src/passes/1-parser/shared/Lexer.mli
@@ -70,7 +70,7 @@ module type TOKEN =
val mk_int : lexeme -> Region.t -> (token, int_err) result
val mk_nat : lexeme -> Region.t -> (token, nat_err) result
- val mk_mtz : lexeme -> Region.t -> (token, int_err) result
+ val mk_mutez : lexeme -> Region.t -> (token, int_err) result
val mk_ident : lexeme -> Region.t -> (token, ident_err) result
val mk_sym : lexeme -> Region.t -> (token, sym_err) result
val mk_string : lexeme -> Region.t -> token
diff --git a/src/passes/1-parser/shared/Lexer.mll b/src/passes/1-parser/shared/Lexer.mll
index 012d8b6b6..3f2ac2020 100644
--- a/src/passes/1-parser/shared/Lexer.mll
+++ b/src/passes/1-parser/shared/Lexer.mll
@@ -111,7 +111,7 @@ module type TOKEN =
val mk_int : lexeme -> Region.t -> (token, int_err) result
val mk_nat : lexeme -> Region.t -> (token, nat_err) result
- val mk_mtz : lexeme -> Region.t -> (token, int_err) result
+ val mk_mutez : lexeme -> Region.t -> (token, int_err) result
val mk_ident : lexeme -> Region.t -> (token, ident_err) result
val mk_sym : lexeme -> Region.t -> (token, sym_err) result
val mk_string : lexeme -> Region.t -> token
@@ -436,9 +436,9 @@ module Make (Token: TOKEN) : (S with module Token = Token) =
| Error Token.Invalid_natural ->
fail region Invalid_natural
- let mk_mtz state buffer =
+ let mk_mutez state buffer =
let region, lexeme, state = sync state buffer in
- match Token.mk_mtz lexeme region with
+ match Token.mk_mutez lexeme region with
Ok token -> token, state
| Error Token.Non_canonical_zero ->
fail region Non_canonical_zero
@@ -447,7 +447,7 @@ module Make (Token: TOKEN) : (S with module Token = Token) =
let region, lexeme, state = sync state buffer in
let lexeme = Str.string_before lexeme (String.index lexeme 't') in
let lexeme = Z.mul (Z.of_int 1_000_000) (Z.of_string lexeme) in
- match Token.mk_mtz (Z.to_string lexeme ^ "mtz") region with
+ match Token.mk_mutez (Z.to_string lexeme ^ "mutez") region with
Ok token -> token, state
| Error Token.Non_canonical_zero ->
fail region Non_canonical_zero
@@ -461,9 +461,9 @@ module Make (Token: TOKEN) : (S with module Token = Token) =
let num = Z.of_string (integral ^ fractional)
and den = Z.of_string ("1" ^ String.make (len-index-1) '0')
and million = Q.of_string "1000000" in
- let mtz = Q.make num den |> Q.mul million in
- let should_be_1 = Q.den mtz in
- if Z.equal Z.one should_be_1 then Some (Q.num mtz) else None
+ let mutez = Q.make num den |> Q.mul million in
+ let should_be_1 = Q.den mutez in
+ if Z.equal Z.one should_be_1 then Some (Q.num mutez) else None
| exception Not_found -> assert false
let mk_tz_decimal state buffer =
@@ -471,7 +471,7 @@ module Make (Token: TOKEN) : (S with module Token = Token) =
let lexeme = Str.string_before lexeme (String.index lexeme 't') in
match format_tz lexeme with
| Some tz -> (
- match Token.mk_mtz (Z.to_string tz ^ "mtz") region with
+ match Token.mk_mutez (Z.to_string tz ^ "mutez") region with
Ok token ->
token, state
| Error Token.Non_canonical_zero ->
@@ -559,7 +559,7 @@ and scan state = parse
| bytes { (mk_bytes seq) state lexbuf |> enqueue }
| natural 'n' { mk_nat state lexbuf |> enqueue }
| natural 'p' { mk_nat state lexbuf |> enqueue }
-| natural "mtz" { mk_mtz state lexbuf |> enqueue }
+| natural "mutez" { mk_mutez state lexbuf |> enqueue }
| natural "tz" { mk_tz state lexbuf |> enqueue }
| decimal "tz" { mk_tz_decimal state lexbuf |> enqueue }
| natural { mk_int state lexbuf |> enqueue }
diff --git a/src/passes/2-simplify/ligodity.ml b/src/passes/2-simplify/ligodity.ml
index 06928f754..9450f117c 100644
--- a/src/passes/2-simplify/ligodity.ml
+++ b/src/passes/2-simplify/ligodity.ml
@@ -420,7 +420,7 @@ let rec simpl_expression :
let n = Z.to_int @@ snd @@ n in
return @@ e_literal ~loc (Literal_nat n)
)
- | EArith (Mtz n) -> (
+ | EArith (Mutez n) -> (
let (n , loc) = r_split n in
let n = Z.to_int @@ snd @@ n in
return @@ e_literal ~loc (Literal_mutez n)
diff --git a/src/passes/2-simplify/pascaligo.ml b/src/passes/2-simplify/pascaligo.ml
index d4924e359..d9fb6266d 100644
--- a/src/passes/2-simplify/pascaligo.ml
+++ b/src/passes/2-simplify/pascaligo.ml
@@ -348,7 +348,7 @@ let rec simpl_expression (t:Raw.expr) : expr result =
let n = Z.to_int @@ snd @@ n in
return @@ e_literal ~loc (Literal_nat n)
)
- | EArith (Mtz n) -> (
+ | EArith (Mutez n) -> (
let (n , loc) = r_split n in
let n = Z.to_int @@ snd @@ n in
return @@ e_literal ~loc (Literal_mutez n)
diff --git a/src/stages/ast_simplified/PP.ml b/src/stages/ast_simplified/PP.ml
index 19a802419..b99e7e62e 100644
--- a/src/stages/ast_simplified/PP.ml
+++ b/src/stages/ast_simplified/PP.ml
@@ -25,7 +25,7 @@ let literal ppf (l:literal) = match l with
| Literal_int n -> fprintf ppf "%d" n
| Literal_nat n -> fprintf ppf "+%d" n
| Literal_timestamp n -> fprintf ppf "+%d" n
- | Literal_mutez n -> fprintf ppf "%dmtz" n
+ | Literal_mutez n -> fprintf ppf "%dmutez" n
| Literal_string s -> fprintf ppf "%S" s
| Literal_bytes b -> fprintf ppf "0x%s" @@ Bytes.to_string @@ Bytes.escaped b
| Literal_address s -> fprintf ppf "@%S" s
diff --git a/src/stages/ast_typed/PP.ml b/src/stages/ast_typed/PP.ml
index fb8923ea9..f95720d8b 100644
--- a/src/stages/ast_typed/PP.ml
+++ b/src/stages/ast_typed/PP.ml
@@ -69,7 +69,7 @@ and literal ppf (l:literal) : unit =
| Literal_int n -> fprintf ppf "%d" n
| Literal_nat n -> fprintf ppf "+%d" n
| Literal_timestamp n -> fprintf ppf "+%d" n
- | Literal_mutez n -> fprintf ppf "%dmtz" n
+ | Literal_mutez n -> fprintf ppf "%dmutez" n
| Literal_string s -> fprintf ppf "%s" s
| Literal_bytes b -> fprintf ppf "0x%s" @@ Bytes.to_string @@ Bytes.escaped b
| Literal_address s -> fprintf ppf "@%s" s
diff --git a/src/stages/mini_c/PP.ml b/src/stages/mini_c/PP.ml
index 951aa2ae6..977c7b931 100644
--- a/src/stages/mini_c/PP.ml
+++ b/src/stages/mini_c/PP.ml
@@ -53,7 +53,7 @@ let rec value ppf : value -> unit = function
| D_int n -> fprintf ppf "%d" n
| D_nat n -> fprintf ppf "+%d" n
| D_timestamp n -> fprintf ppf "+%d" n
- | D_mutez n -> fprintf ppf "%dmtz" n
+ | D_mutez n -> fprintf ppf "%dmutez" n
| D_unit -> fprintf ppf "unit"
| D_string s -> fprintf ppf "\"%s\"" s
| D_bytes x ->
diff --git a/src/test/contracts/tez.ligo b/src/test/contracts/tez.ligo
index cd76c47c7..31d5915cf 100644
--- a/src/test/contracts/tez.ligo
+++ b/src/test/contracts/tez.ligo
@@ -1,16 +1,16 @@
-const add_tez : tez = 21mtz + 0.000021tz;
-const sub_tez : tez = 21mtz - 20mtz;
+const add_tez : tez = 21mutez + 0.000021tz;
+const sub_tez : tez = 21mutez - 20mutez;
(* This is not enough. *)
-const not_enough_tez : tez = 4611686018427387903mtz;
+const not_enough_tez : tez = 4611686018427387903mutez;
-const nat_mul_tez : tez = 1n * 100mtz;
-const tez_mul_nat : tez = 100mtz * 10n;
+const nat_mul_tez : tez = 1n * 100mutez;
+const tez_mul_nat : tez = 100mutez * 10n;
-const tez_div_tez1 : nat = 100mtz / 1mtz;
-const tez_div_tez2 : nat = 100mtz / 90mtz;
-const tez_div_tez3 : nat = 100mtz / 110mtz;
+const tez_div_tez1 : nat = 100mutez / 1mutez;
+const tez_div_tez2 : nat = 100mutez / 90mutez;
+const tez_div_tez3 : nat = 100mutez / 110mutez;
-const tez_mod_tez1 : tez = 100mtz mod 1mtz;
-const tez_mod_tez2 : tez = 100mtz mod 90mtz;
-const tez_mod_tez3 : tez = 100mtz mod 110mtz;
+const tez_mod_tez1 : tez = 100mutez mod 1mutez;
+const tez_mod_tez2 : tez = 100mutez mod 90mutez;
+const tez_mod_tez3 : tez = 100mutez mod 110mutez;
diff --git a/src/test/contracts/tez.mligo b/src/test/contracts/tez.mligo
index 3f82198c5..557de9e2d 100644
--- a/src/test/contracts/tez.mligo
+++ b/src/test/contracts/tez.mligo
@@ -1,4 +1,4 @@
-let add_tez : tez = 21mtz + 0.000021tz
+let add_tez : tez = 21mutez + 0.000021tz
let sub_tez : tez = 0.000021tz - 0.000020tz
let not_enough_tez : tez = 4611686018427.387903tz