From 45a0559400766a0085933ba75c41dd32aaf2adeb Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Wed, 7 Mar 2018 21:50:28 -0500 Subject: [PATCH] Derive MonadFresh, Alternative, & MonadNonDet instances for Evaluation. --- src/Analysis/Abstract/Evaluating.hs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Analysis/Abstract/Evaluating.hs b/src/Analysis/Abstract/Evaluating.hs index ce3c3fc26..19a283e62 100644 --- a/src/Analysis/Abstract/Evaluating.hs +++ b/src/Analysis/Abstract/Evaluating.hs @@ -2,6 +2,8 @@ module Analysis.Abstract.Evaluating where import Control.Abstract.Evaluator +import Control.Monad.Effect.Fresh +import Control.Monad.Effect.NonDet import Data.Abstract.Evaluatable import Data.Abstract.Linker import Data.Abstract.Value @@ -50,6 +52,9 @@ newtype Evaluation term value effects a = Evaluation { runEvaluation :: Evaluato deriving (Applicative, Functor, LiftEffect, Monad) deriving instance Member Fail effects => MonadFail (Evaluation term value effects) +deriving instance Member Fresh effects => MonadFresh (Evaluation term value effects) +deriving instance Member NonDetEff effects => Alternative (Evaluation term value effects) +deriving instance Member NonDetEff effects => MonadNonDet (Evaluation term value effects) deriving instance (Member Fail effects, MonadEvaluator (Evaluator term value effects), Ord (LocationFor value)) => MonadEvaluator (Evaluation term value effects) instance ( Evaluatable (Base term)