From 3a050c8b43534c1c64d56fdeb7947920ec38e1ec Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Tue, 15 May 2018 12:42:21 -0400 Subject: [PATCH] Generalize runEnvironmentError/With over the Effectful context. --- src/Control/Abstract/Environment.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Control/Abstract/Environment.hs b/src/Control/Abstract/Environment.hs index 81645a511..4f4ee0f40 100644 --- a/src/Control/Abstract/Environment.hs +++ b/src/Control/Abstract/Environment.hs @@ -82,8 +82,8 @@ instance Eq1 (EnvironmentError value) where liftEq _ (FreeVariable n1) (FreeVari freeVariableError :: Member (Resumable (EnvironmentError value)) effects => Name -> Evaluator location value effects value freeVariableError = throwResumable . FreeVariable -runEnvironmentError :: Evaluator location value (Resumable (EnvironmentError value) ': effects) a -> Evaluator location value effects (Either (SomeExc (EnvironmentError value)) a) +runEnvironmentError :: Effectful (m location value) => m location value (Resumable (EnvironmentError value) ': effects) a -> m location value effects (Either (SomeExc (EnvironmentError value)) a) runEnvironmentError = runResumable -runEnvironmentErrorWith :: (forall resume . EnvironmentError value resume -> Evaluator location value effects resume) -> Evaluator location value (Resumable (EnvironmentError value) ': effects) a -> Evaluator location value effects a +runEnvironmentErrorWith :: Effectful (m location value) => (forall resume . EnvironmentError value resume -> m location value effects resume) -> m location value (Resumable (EnvironmentError value) ': effects) a -> m location value effects a runEnvironmentErrorWith = runResumableWith