From c4e996d5aa1c2ee9c4bed0a99b8ba1c767e11262 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Suzanne=20Dup=C3=A9ron?= Date: Wed, 23 Oct 2019 12:17:18 -0400 Subject: [PATCH] Fixed module issue, thanks Christian --- src/passes/4-typer/solver.ml | 40 ++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/src/passes/4-typer/solver.ml b/src/passes/4-typer/solver.ml index 91b6715ac..cf345b218 100644 --- a/src/passes/4-typer/solver.ml +++ b/src/passes/4-typer/solver.ml @@ -864,13 +864,13 @@ let compare_output_specialize1 { poly = a1; a_k_var = a2 } { poly = b1; a_k_var let compare_output_break_ctor { a_k_var=a1; a_k'_var'=a2 } { a_k_var=b1; a_k'_var'=b2 } = compare_c_constructor_simpl a1 b1 compare_c_constructor_simpl a2 b2 -module OutputSpecialize1 : Set.OrderedType = struct +module OutputSpecialize1 : (Set.OrderedType with type t = output_specialize1) = struct type t = output_specialize1 let compare = compare_output_specialize1 end -module BreakCtor : Set.OrderedType = struct +module BreakCtor : (Set.OrderedType with type t = output_break_ctor) = struct type t = output_break_ctor let compare = compare_output_break_ctor end @@ -917,24 +917,24 @@ let propagator_specialize1 : output_specialize1 propagator = module M (BlaBla : Set.OrderedType) = struct module AlreadySelected = Set.Make(BlaBla) -let select_and_propagate : ('old_input, 'selector_output) selector -> BlaBla.t propagator -> 'a -> structured_dbs -> new_constraints * new_assignments = - fun selector propagator -> - fun old_type_constraint dbs -> - (* TODO: thread some state to know which selector outputs were already seen *) - let already_selected = failwith "(?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? TODO)" in - match selector old_type_constraint dbs with - WasSelected selected_outputs -> - (* TODO: fold instead. *) - let selected_outputs = List.filter (fun elt -> AlreadySelected.mem elt already_selected) selected_outputs in - let blahblah = List.fold_left (fun acc elt -> AlreadySelected.add elt acc) already_selected selected_outputs in - let _______________________________________________________________________________________________________________________________________TODO = blahblah in - (* Call the propagation rule *) - let new_contraints_and_assignments = List.map (fun s -> propagator s dbs) selected_outputs in - let (new_constraints , new_assignments) = List.split new_contraints_and_assignments in - (* return so that the new constraints are pushed to some kind of work queue and the new assignments stored *) - (List.flatten new_constraints , List.flatten new_assignments) - | WasNotSelected -> - ([] , []) + let select_and_propagate : ('old_input, 'selector_output) selector -> BlaBla.t propagator -> 'a -> structured_dbs -> new_constraints * new_assignments = + fun selector propagator -> + fun old_type_constraint dbs -> + (* TODO: thread some state to know which selector outputs were already seen *) + let already_selected = failwith "(?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? TODO)" in + match selector old_type_constraint dbs with + WasSelected selected_outputs -> + (* TODO: fold instead. *) + let selected_outputs = List.filter (fun elt -> AlreadySelected.mem elt already_selected) selected_outputs in + let blahblah = List.fold_left (fun acc elt -> AlreadySelected.add elt acc) already_selected selected_outputs in + let _______________________________________________________________________________________________________________________________________TODO = blahblah in + (* Call the propagation rule *) + let new_contraints_and_assignments = List.map (fun s -> propagator s dbs) selected_outputs in + let (new_constraints , new_assignments) = List.split new_contraints_and_assignments in + (* return so that the new constraints are pushed to some kind of work queue and the new assignments stored *) + (List.flatten new_constraints , List.flatten new_assignments) + | WasNotSelected -> + ([] , []) end module M_break_ctor = M(BreakCtor)