From 8d3f175a8232fd784c8b42c0d53a2a63759ff25d Mon Sep 17 00:00:00 2001 From: Mysaa Date: Thu, 14 Mar 2024 14:16:53 +0100 Subject: [PATCH] Added solver for Functor actions --- src/Solver.ml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Solver.ml b/src/Solver.ml index 69e45db..280e79e 100644 --- a/src/Solver.ml +++ b/src/Solver.ml @@ -66,13 +66,13 @@ module Make (T : Utils.Functor) = struct begin match (evalc c) with | NRet a -> NRet (fun ctx -> (f (a ctx))) | NErr e -> NErr e - | NDo act -> Utils.not_yet "NDo" (act) + | NDo act -> NDo (T.map (fun c -> Constraint.Map(c,f)) act) end | MapErr(c, f) -> begin match (evalc c) with | NRet a -> NRet a | NErr e -> NErr (f e) - | NDo act -> Utils.not_yet "NDo" (act) + | NDo act -> NDo (T.map (fun c -> Constraint.MapErr(c,f)) act) end | Conj(c,d) -> begin match (evalc c) with @@ -80,10 +80,10 @@ module Make (T : Utils.Functor) = struct begin match (evalc d) with | NRet b -> NRet (fun ctx -> (a ctx,b ctx)) | NErr e -> NErr e - | NDo act -> Utils.not_yet "NDo" (act) + | NDo act2 -> NDo (T.map (fun d -> Constraint.Conj(c,d)) act2) end | NErr e -> NErr e - | NDo act -> Utils.not_yet "NDo" (act) + | NDo act1 -> NDo (T.map (fun c -> Constraint.Conj(c,d)) act1) end | Eq(x,y) -> begin match (Unif.unify (!env) x y) with