From f42c2ef3751974765f032e4fd3863d1a57b43100 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Thu, 30 Nov 2017 19:56:44 -0500 Subject: [PATCH] :fire: ev. --- src/Analysis/Abstract/Evaluating.hs | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/Analysis/Abstract/Evaluating.hs b/src/Analysis/Abstract/Evaluating.hs index 931494299..3be71f089 100644 --- a/src/Analysis/Abstract/Evaluating.hs +++ b/src/Analysis/Abstract/Evaluating.hs @@ -25,8 +25,6 @@ type MonadInterpreter v m = (MonadEnv v m, MonadStore v m, MonadFail m) type EvalResult v = Final (Interpreter v) v -type Eval' t m v = (v -> m v) -> t -> m v - -- Evaluate an expression. -- Example: -- evaluate @Type @@ -41,11 +39,4 @@ evaluate :: forall v term ) => term -> EvalResult v -evaluate = run @(Interpreter v) . fix ev pure - -ev :: ( Functor (Base term) - , Recursive term - , Eval term v m (Base term) - ) - => Eval' term m v -> Eval' term m v -ev recur yield = eval recur yield . project +evaluate = run @(Interpreter v) . fix (\ recur yield -> eval recur yield . project) pure