From f59cdd394b5243fb3a39d89e0bef18cd9ea12b35 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 7 Dec 2018 10:34:40 -0500 Subject: [PATCH] Add a resolve method to Evaluatable with a (bad) default definition. --- src/Data/Abstract/Evaluatable.hs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Data/Abstract/Evaluatable.hs b/src/Data/Abstract/Evaluatable.hs index 68a51f3fd..de0a027c8 100644 --- a/src/Data/Abstract/Evaluatable.hs +++ b/src/Data/Abstract/Evaluatable.hs @@ -77,6 +77,12 @@ class (Show1 constr, Foldable constr) => Evaluatable constr where v <- throwUnspecializedError $ UnspecializedError ("Eval unspecialized for " <> liftShowsPrec (const (const id)) (const id) 0 expr "") rvalBox v + resolve :: ( Carrier sig m + ) + => (term -> Evaluator term address value m value) + -> (constr term -> Evaluator term address value m address) + resolve _ = undefined + traceResolve :: (Show a, Show b, Member Trace sig, Carrier sig m) => a -> b -> Evaluator term address value m () traceResolve name path = trace ("resolved " <> show name <> " -> " <> show path)