From 82bb54622a47bb092094c8efab8200b12817c5b4 Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Fri, 11 Feb 2022 09:22:18 +0100 Subject: Hide structure in motus solver --- motus/js/reload.ml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'motus/js/reload.ml') diff --git a/motus/js/reload.ml b/motus/js/reload.ml index 3a461ee..cfdfa2a 100644 --- a/motus/js/reload.ml +++ b/motus/js/reload.ml @@ -1,3 +1,5 @@ +(** Reload the list without the current proposition *) + open StdLabels type t = unit @@ -15,15 +17,15 @@ let process : t -> State.state -> State.state = |> String.of_seq in - let element = - List.filter - ~f:(fun w -> not (String.equal w word)) - state.State.analysis.element + let new_state = + { state with + analysis = Motus_lib.Persistence.remove_word state.analysis word + } in - let analysis = { state.analysis with element } in - let new_state = { state with analysis } in (* Get the new proposition if any *) - let current_prop = Initialize.get_proposition analysis state.rules in + let current_prop = + Initialize.get_proposition new_state.analysis state.rules + in match current_prop with | None -> new_state | Some prop -> -- cgit v1.2.3