From 02d66cf536c83a9cbc66dc13e866b573eba9d995 Mon Sep 17 00:00:00 2001 From: Pierre-Emmanuel Wulfman Date: Fri, 12 Jun 2020 14:16:17 +0200 Subject: [PATCH] rename operators to predefined --- src/main/run/dune | 2 +- src/passes/03-tree_abstraction/cameligo/compiler.ml | 2 +- src/passes/03-tree_abstraction/cameligo/dune | 2 +- src/passes/03-tree_abstraction/dune | 6 +----- src/passes/03-tree_abstraction/pascaligo/compiler.ml | 2 +- src/passes/03-tree_abstraction/pascaligo/dune | 2 +- src/passes/09-typing/08-typer-new/dune | 2 +- src/passes/09-typing/08-typer-old/dune | 2 +- src/passes/09-typing/dune | 2 +- src/passes/11-spilling/dune | 2 +- src/passes/13-stacking/compiler_program.ml | 4 ++-- src/passes/13-stacking/compiler_program.mli | 2 +- src/passes/13-stacking/dune | 2 +- src/passes/{operators => predefined}/dune | 4 ++-- src/passes/{operators => predefined}/helpers.ml | 0 src/passes/{operators => predefined}/helpers.mli | 0 .../{operators/operators.ml => predefined/predefined.ml} | 0 .../{operators/operators.mli => predefined/predefined.mli} | 0 18 files changed, 16 insertions(+), 20 deletions(-) rename src/passes/{operators => predefined}/dune (82%) rename src/passes/{operators => predefined}/helpers.ml (100%) rename src/passes/{operators => predefined}/helpers.mli (100%) rename src/passes/{operators/operators.ml => predefined/predefined.ml} (100%) rename src/passes/{operators/operators.mli => predefined/predefined.mli} (100%) diff --git a/src/main/run/dune b/src/main/run/dune index 6ba5de32d..d3bb7db38 100644 --- a/src/main/run/dune +++ b/src/main/run/dune @@ -14,7 +14,7 @@ ast_typed spilling mini_c - operators + predefined stacking compile ) diff --git a/src/passes/03-tree_abstraction/cameligo/compiler.ml b/src/passes/03-tree_abstraction/cameligo/compiler.ml index 47824721d..5dd691fae 100644 --- a/src/passes/03-tree_abstraction/cameligo/compiler.ml +++ b/src/passes/03-tree_abstraction/cameligo/compiler.ml @@ -19,7 +19,7 @@ let pseq_to_list = function | Some lst -> npseq_to_list lst let get_value : 'a Raw.reg -> 'a = fun x -> x.value -open Operators.Tree_abstraction.Cameligo +open Predefined.Tree_abstraction.Cameligo let r_split = Location.r_split diff --git a/src/passes/03-tree_abstraction/cameligo/dune b/src/passes/03-tree_abstraction/cameligo/dune index 838d52525..af72191ce 100644 --- a/src/passes/03-tree_abstraction/cameligo/dune +++ b/src/passes/03-tree_abstraction/cameligo/dune @@ -6,7 +6,7 @@ tezos-utils cst ast_imperative - operators) + predefined) (preprocess (pps ppx_let diff --git a/src/passes/03-tree_abstraction/dune b/src/passes/03-tree_abstraction/dune index d204fd9dd..76cc80595 100644 --- a/src/passes/03-tree_abstraction/dune +++ b/src/passes/03-tree_abstraction/dune @@ -2,12 +2,8 @@ (name tree_abstraction) (public_name ligo.tree_abstraction) (libraries - simple-utils - tezos-utils cameligo - pascaligo - ast_imperative - operators) + pascaligo) (preprocess (pps ppx_let diff --git a/src/passes/03-tree_abstraction/pascaligo/compiler.ml b/src/passes/03-tree_abstraction/pascaligo/compiler.ml index 8c5a812b1..d3805389d 100644 --- a/src/passes/03-tree_abstraction/pascaligo/compiler.ml +++ b/src/passes/03-tree_abstraction/pascaligo/compiler.ml @@ -12,7 +12,7 @@ let npseq_to_ne_list (hd, tl) = (hd, List.map snd tl) let (<@) f g x = f (g x) -open Operators.Tree_abstraction.Pascaligo +open Predefined.Tree_abstraction.Pascaligo let r_split = Location.r_split diff --git a/src/passes/03-tree_abstraction/pascaligo/dune b/src/passes/03-tree_abstraction/pascaligo/dune index e4e379e7d..18101257f 100644 --- a/src/passes/03-tree_abstraction/pascaligo/dune +++ b/src/passes/03-tree_abstraction/pascaligo/dune @@ -6,7 +6,7 @@ tezos-utils cst ast_imperative - operators) + predefined) (preprocess (pps ppx_let diff --git a/src/passes/09-typing/08-typer-new/dune b/src/passes/09-typing/08-typer-new/dune index af5327e8f..4b2e80840 100644 --- a/src/passes/09-typing/08-typer-new/dune +++ b/src/passes/09-typing/08-typer-new/dune @@ -6,7 +6,7 @@ tezos-utils ast_core ast_typed - operators + predefined UnionFind environment typer_common diff --git a/src/passes/09-typing/08-typer-old/dune b/src/passes/09-typing/08-typer-old/dune index fc8cfbd18..10601f713 100644 --- a/src/passes/09-typing/08-typer-old/dune +++ b/src/passes/09-typing/08-typer-old/dune @@ -8,7 +8,7 @@ ast_core ast_typed typer_new - operators + predefined environment ) (preprocess diff --git a/src/passes/09-typing/dune b/src/passes/09-typing/dune index f6072da39..2b31ab3c8 100644 --- a/src/passes/09-typing/dune +++ b/src/passes/09-typing/dune @@ -8,7 +8,7 @@ ast_typed typer_old typer_new - operators + predefined ) (preprocess (pps ppx_let bisect_ppx --conditional) diff --git a/src/passes/11-spilling/dune b/src/passes/11-spilling/dune index d585b7233..74cf7320c 100644 --- a/src/passes/11-spilling/dune +++ b/src/passes/11-spilling/dune @@ -7,7 +7,7 @@ ast_typed mini_c self_mini_c - operators + predefined ) (preprocess (pps ppx_let bisect_ppx --conditional) diff --git a/src/passes/13-stacking/compiler_program.ml b/src/passes/13-stacking/compiler_program.ml index 888599af8..670fdd4bd 100644 --- a/src/passes/13-stacking/compiler_program.ml +++ b/src/passes/13-stacking/compiler_program.ml @@ -3,11 +3,11 @@ open Errors open Mini_c open Michelson open Memory_proto_alpha.Protocol.Script_ir_translator -open Operators.Stacking +open Predefined.Stacking (* This does not makes sense to me *) let rec get_operator : constant' -> type_expression -> expression list -> (predicate , stacking_error) result = fun s ty lst -> - match Operators.Stacking.get_operators s with + match Predefined.Stacking.get_operators s with | Some x -> ok x | None -> ( match s with diff --git a/src/passes/13-stacking/compiler_program.mli b/src/passes/13-stacking/compiler_program.mli index 4ccf911a7..eed0d1090 100644 --- a/src/passes/13-stacking/compiler_program.mli +++ b/src/passes/13-stacking/compiler_program.mli @@ -4,7 +4,7 @@ open Mini_c open Michelson open Memory_proto_alpha.Protocol.Script_ir_translator -open Operators.Stacking +open Predefined.Stacking (* module Contract_types = Meta_michelson.Types diff --git a/src/passes/13-stacking/dune b/src/passes/13-stacking/dune index 7815cba6a..2b8e14786 100644 --- a/src/passes/13-stacking/dune +++ b/src/passes/13-stacking/dune @@ -6,7 +6,7 @@ proto-alpha-utils tezos-utils mini_c - operators + predefined ) (preprocess (pps ppx_let bisect_ppx --conditional) diff --git a/src/passes/operators/dune b/src/passes/predefined/dune similarity index 82% rename from src/passes/operators/dune rename to src/passes/predefined/dune index fa69f6257..30ea10add 100644 --- a/src/passes/operators/dune +++ b/src/passes/predefined/dune @@ -1,6 +1,6 @@ (library - (name operators) - (public_name ligo.operators) + (name predefined) + (public_name ligo.predefined) (libraries simple-utils tezos-utils diff --git a/src/passes/operators/helpers.ml b/src/passes/predefined/helpers.ml similarity index 100% rename from src/passes/operators/helpers.ml rename to src/passes/predefined/helpers.ml diff --git a/src/passes/operators/helpers.mli b/src/passes/predefined/helpers.mli similarity index 100% rename from src/passes/operators/helpers.mli rename to src/passes/predefined/helpers.mli diff --git a/src/passes/operators/operators.ml b/src/passes/predefined/predefined.ml similarity index 100% rename from src/passes/operators/operators.ml rename to src/passes/predefined/predefined.ml diff --git a/src/passes/operators/operators.mli b/src/passes/predefined/predefined.mli similarity index 100% rename from src/passes/operators/operators.mli rename to src/passes/predefined/predefined.mli