From eb2c2b34d68d3922af1bc7648a1471e2d970d9f1 Mon Sep 17 00:00:00 2001 From: Alain Mebsout Date: Thu, 1 Jun 2023 13:23:12 +0200 Subject: [PATCH] SCORU/Node: move Reference outside of proto directory --- .../reference.ml | 0 .../reference.mli | 0 .../lib_sc_rollup_node/reference.ml | 38 --------------- .../lib_sc_rollup_node/reference.mli | 48 ------------------- .../lib_sc_rollup_node/reference.ml | 38 --------------- .../lib_sc_rollup_node/reference.mli | 48 ------------------- 6 files changed, 172 deletions(-) rename src/{proto_016_PtMumbai/lib_sc_rollup_node => lib_smart_rollup_node}/reference.ml (100%) rename src/{proto_016_PtMumbai/lib_sc_rollup_node => lib_smart_rollup_node}/reference.mli (100%) delete mode 100644 src/proto_017_PtNairob/lib_sc_rollup_node/reference.ml delete mode 100644 src/proto_017_PtNairob/lib_sc_rollup_node/reference.mli delete mode 100644 src/proto_alpha/lib_sc_rollup_node/reference.ml delete mode 100644 src/proto_alpha/lib_sc_rollup_node/reference.mli diff --git a/src/proto_016_PtMumbai/lib_sc_rollup_node/reference.ml b/src/lib_smart_rollup_node/reference.ml similarity index 100% rename from src/proto_016_PtMumbai/lib_sc_rollup_node/reference.ml rename to src/lib_smart_rollup_node/reference.ml diff --git a/src/proto_016_PtMumbai/lib_sc_rollup_node/reference.mli b/src/lib_smart_rollup_node/reference.mli similarity index 100% rename from src/proto_016_PtMumbai/lib_sc_rollup_node/reference.mli rename to src/lib_smart_rollup_node/reference.mli diff --git a/src/proto_017_PtNairob/lib_sc_rollup_node/reference.ml b/src/proto_017_PtNairob/lib_sc_rollup_node/reference.ml deleted file mode 100644 index abb57b197bdb..000000000000 --- a/src/proto_017_PtNairob/lib_sc_rollup_node/reference.ml +++ /dev/null @@ -1,38 +0,0 @@ -(*****************************************************************************) -(* *) -(* Open Source License *) -(* Copyright (c) 2023 Nomadic Labs, *) -(* *) -(* Permission is hereby granted, free of charge, to any person obtaining a *) -(* copy of this software and associated documentation files (the "Software"),*) -(* to deal in the Software without restriction, including without limitation *) -(* the rights to use, copy, modify, merge, publish, distribute, sublicense, *) -(* and/or sell copies of the Software, and to permit persons to whom the *) -(* Software is furnished to do so, subject to the following conditions: *) -(* *) -(* The above copyright notice and this permission notice shall be included *) -(* in all copies or substantial portions of the Software. *) -(* *) -(* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR*) -(* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *) -(* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL *) -(* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER*) -(* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING *) -(* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER *) -(* DEALINGS IN THE SOFTWARE. *) -(* *) -(*****************************************************************************) - -type ('perm, 'value) t = 'value ref - -type 'a rw = ([`Read | `Write], 'a) t - -type 'a ro = ([`Read], 'a) t - -let get r = !r - -let set r v = r := v - -let new_ v = ref v - -let readonly r = r diff --git a/src/proto_017_PtNairob/lib_sc_rollup_node/reference.mli b/src/proto_017_PtNairob/lib_sc_rollup_node/reference.mli deleted file mode 100644 index 04821bff4834..000000000000 --- a/src/proto_017_PtNairob/lib_sc_rollup_node/reference.mli +++ /dev/null @@ -1,48 +0,0 @@ -(*****************************************************************************) -(* *) -(* Open Source License *) -(* Copyright (c) 2023 Nomadic Labs, *) -(* *) -(* Permission is hereby granted, free of charge, to any person obtaining a *) -(* copy of this software and associated documentation files (the "Software"),*) -(* to deal in the Software without restriction, including without limitation *) -(* the rights to use, copy, modify, merge, publish, distribute, sublicense, *) -(* and/or sell copies of the Software, and to permit persons to whom the *) -(* Software is furnished to do so, subject to the following conditions: *) -(* *) -(* The above copyright notice and this permission notice shall be included *) -(* in all copies or substantial portions of the Software. *) -(* *) -(* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR*) -(* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *) -(* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL *) -(* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER*) -(* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING *) -(* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER *) -(* DEALINGS IN THE SOFTWARE. *) -(* *) -(*****************************************************************************) - -(** Abstraction module for OCaml references *) - -(** Type [('perm, 'value) t] represents references containing a value - of type ['value] and permissions specified by ['perm]. *) -type ('perm, 'value) t - -(** Read/write reference {!t}. *) -type 'a rw = ([`Read | `Write], 'a) t - -(** Read only reference {!t}. *) -type 'a ro = ([`Read], 'a) t - -(** [get r] returns the value held by reference [r]. *) -val get : (_, 'a) t -> 'a - -(** [set r v] sets reference [r] to the value [v]. *) -val set : 'a rw -> 'a -> unit - -(** [new_ v] creates a fresh reference holding value [v]. *) -val new_ : 'a -> (_, 'a) t - -(** [readonly r] casts reference [r] to be read only. *) -val readonly : (_, 'a) t -> 'a ro diff --git a/src/proto_alpha/lib_sc_rollup_node/reference.ml b/src/proto_alpha/lib_sc_rollup_node/reference.ml deleted file mode 100644 index abb57b197bdb..000000000000 --- a/src/proto_alpha/lib_sc_rollup_node/reference.ml +++ /dev/null @@ -1,38 +0,0 @@ -(*****************************************************************************) -(* *) -(* Open Source License *) -(* Copyright (c) 2023 Nomadic Labs, *) -(* *) -(* Permission is hereby granted, free of charge, to any person obtaining a *) -(* copy of this software and associated documentation files (the "Software"),*) -(* to deal in the Software without restriction, including without limitation *) -(* the rights to use, copy, modify, merge, publish, distribute, sublicense, *) -(* and/or sell copies of the Software, and to permit persons to whom the *) -(* Software is furnished to do so, subject to the following conditions: *) -(* *) -(* The above copyright notice and this permission notice shall be included *) -(* in all copies or substantial portions of the Software. *) -(* *) -(* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR*) -(* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *) -(* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL *) -(* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER*) -(* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING *) -(* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER *) -(* DEALINGS IN THE SOFTWARE. *) -(* *) -(*****************************************************************************) - -type ('perm, 'value) t = 'value ref - -type 'a rw = ([`Read | `Write], 'a) t - -type 'a ro = ([`Read], 'a) t - -let get r = !r - -let set r v = r := v - -let new_ v = ref v - -let readonly r = r diff --git a/src/proto_alpha/lib_sc_rollup_node/reference.mli b/src/proto_alpha/lib_sc_rollup_node/reference.mli deleted file mode 100644 index 04821bff4834..000000000000 --- a/src/proto_alpha/lib_sc_rollup_node/reference.mli +++ /dev/null @@ -1,48 +0,0 @@ -(*****************************************************************************) -(* *) -(* Open Source License *) -(* Copyright (c) 2023 Nomadic Labs, *) -(* *) -(* Permission is hereby granted, free of charge, to any person obtaining a *) -(* copy of this software and associated documentation files (the "Software"),*) -(* to deal in the Software without restriction, including without limitation *) -(* the rights to use, copy, modify, merge, publish, distribute, sublicense, *) -(* and/or sell copies of the Software, and to permit persons to whom the *) -(* Software is furnished to do so, subject to the following conditions: *) -(* *) -(* The above copyright notice and this permission notice shall be included *) -(* in all copies or substantial portions of the Software. *) -(* *) -(* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR*) -(* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *) -(* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL *) -(* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER*) -(* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING *) -(* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER *) -(* DEALINGS IN THE SOFTWARE. *) -(* *) -(*****************************************************************************) - -(** Abstraction module for OCaml references *) - -(** Type [('perm, 'value) t] represents references containing a value - of type ['value] and permissions specified by ['perm]. *) -type ('perm, 'value) t - -(** Read/write reference {!t}. *) -type 'a rw = ([`Read | `Write], 'a) t - -(** Read only reference {!t}. *) -type 'a ro = ([`Read], 'a) t - -(** [get r] returns the value held by reference [r]. *) -val get : (_, 'a) t -> 'a - -(** [set r v] sets reference [r] to the value [v]. *) -val set : 'a rw -> 'a -> unit - -(** [new_ v] creates a fresh reference holding value [v]. *) -val new_ : 'a -> (_, 'a) t - -(** [readonly r] casts reference [r] to be read only. *) -val readonly : (_, 'a) t -> 'a ro -- GitLab