diff --git a/src/KitBa.ml b/src/KitBa.ml
index f2d5b9d20115cc1db10d933743c8f82db86427c7..3f30414164458dff8f2b6fafd3e3e073d2b85783 100644
--- a/src/KitBa.ml
+++ b/src/KitBa.ml
@@ -4,7 +4,7 @@
[IllFormed x] is raised if the atom [x] occurs twice in a binding
position. *)
-exception IllFormed of Atom.t
+exception IllFormed = Atom.Set.NonDisjointUnion
type env = unit
@@ -16,18 +16,8 @@ class ['self] reduce = object (_ : 'self)
method private visit_'fn () _x =
Atom.Set.empty
- (* TEMPORARY could move this monoid to [Atom] *)
(* The monoid of sets of atoms, equipped with disjoint union, is used. *)
- method zero =
- Atom.Set.empty
- method plus xs ys =
- match Atom.Set.choose (Atom.Set.inter xs ys) with
- | exception Not_found ->
- (* The intersection of [xs] and [ys] is empty; good.
- Compute their disjoint union. *)
- Atom.Set.union xs ys
- | x ->
- raise (IllFormed x)
+ inherit [_] Atom.Set.disjoint_union_monoid
(* The atom [x] is added to the set of bound atoms when its scope is
exited. *)