[PATCH] remove inline record types in Code
Export this patch
The purpose of this is to create a content-adressable build cache with
irmin.
---
lib/core/Code.ml | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/lib/core/Code.ml b/lib/core/Code.ml
index 28cf3a9..a990e83 100644
--- a/lib/core/Code.ml
+++ b/lib/core/Code.ml
@@ -16,8 +16,8 @@ type node =
| Default of Trie.path * t
| Get of Trie.path
- | Object of {self : Trie.path option; methods : (string * t) list}
- | Patch of {obj : t; self : Trie.path option; methods: (string * t) list}
+ | Object of _object
+ | Patch of patch
| Call of t * string
| Import of visibility * string
@@ -28,6 +28,12 @@ type node =
| Namespace of Trie.path * t
[@@deriving show]
+and _object = {self : Trie.path option; methods : (string * t) list}
+[@@deriving show]
+
+and patch = {obj : t; self : Trie.path option; methods: (string * t) list}
+[@@deriving show]
+
and t = node Range.located list
[@@deriving show]
--
2.45.2