From dc7d355dbc581c2595a2bba4c377cacb6c2ff696 Mon Sep 17 00:00:00 2001 From: Marcos Magueta Date: Sat, 31 Oct 2026 02:52:11 -0300 Subject: where modes drop only the attribute its index reads --- lib/concepts/Mode.ml | 4 ++-- lib/concepts/Mode.mli | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/concepts') diff --git a/lib/concepts/Mode.ml b/lib/concepts/Mode.ml index b3031fc..9c5daa9 100644 --- a/lib/concepts/Mode.ml +++ b/lib/concepts/Mode.ml @@ -17,5 +17,5 @@ let exhaustible modes bound = let project attributes = List.filter (fun {bound; _} -> BatSet.String.subset bound attributes) -let given attributes = - List.map (fun {bound; yields} -> {bound= BatSet.String.diff bound attributes; yields}) +let given attribute = + List.map (fun {bound; yields} -> {bound= BatSet.String.remove attribute bound; yields}) diff --git a/lib/concepts/Mode.mli b/lib/concepts/Mode.mli index ba1a04a..0518bca 100644 --- a/lib/concepts/Mode.mli +++ b/lib/concepts/Mode.mli @@ -13,4 +13,4 @@ val exhaustible : t -> attributes -> bool (** the modes still usable when only [attributes] can be bound. *) val project : attributes -> t -> t -val given : attributes -> t -> t +val given : string -> t -> t -- cgit v1.2.3