aboutsummaryrefslogtreecommitdiffstats
path: root/lib/concepts/Multigroup.ml
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--lib/concepts/Multigroup.ml10
-rw-r--r--lib/concepts/Multigroup.mli1
2 files changed, 9 insertions, 2 deletions
diff --git a/lib/concepts/Multigroup.ml b/lib/concepts/Multigroup.ml
index b8fc743..863cd26 100644
--- a/lib/concepts/Multigroup.ml
+++ b/lib/concepts/Multigroup.ml
@@ -1,5 +1,8 @@
type address = Hash.hash
-type t = {name: string; relations: address}
+
+type t =
+ { name: string;
+ relations: address }
module Field = struct
let name = "name"
@@ -19,6 +22,7 @@ module Error = struct
end
let make ~name ~relations = {name; relations}
+
let name multigroup = multigroup.name
let relations multigroup = multigroup.relations
@@ -27,7 +31,9 @@ module Body = struct
let tag = 'm'
let malformed = Error.malformed_multigroup
- let equal left right = left.name = right.name && Hash.hash_equals left.relations right.relations
+
+ let equal left right =
+ left.name = right.name && Hash.hash_equals left.relations right.relations
let fields multigroup =
[ Field.name, Object.Field.string multigroup.name;
diff --git a/lib/concepts/Multigroup.mli b/lib/concepts/Multigroup.mli
index ef0f8ea..1a76dce 100644
--- a/lib/concepts/Multigroup.mli
+++ b/lib/concepts/Multigroup.mli
@@ -4,5 +4,6 @@ type address = Hash.hash
include Object.S with type t := t
val make : name:string -> relations:address -> t
+
val name : t -> string
val relations : t -> address