From 02701fccd8e6154388e83de3a0098a7e09c1bf90 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Mon, 22 Oct 2018 12:05:57 -0400 Subject: [PATCH] Simplify the UnspecializedError carriers. --- src/Data/Abstract/Evaluatable.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Data/Abstract/Evaluatable.hs b/src/Data/Abstract/Evaluatable.hs index e74d400b9..0648a38ec 100644 --- a/src/Data/Abstract/Evaluatable.hs +++ b/src/Data/Abstract/Evaluatable.hs @@ -332,15 +332,15 @@ instance Show1 (UnspecializedError a) where liftShowsPrec _ _ = showsPrec runUnspecialized :: (Carrier sig m, Effect sig) - => Evaluator term address value (ResumableC (BaseError (UnspecializedError value)) (Evaluator term address value m)) a + => Evaluator term address value (ResumableC (BaseError (UnspecializedError value)) (Eff m)) a -> Evaluator term address value m (Either (SomeError (BaseError (UnspecializedError value))) a) -runUnspecialized = runResumable . runEvaluator +runUnspecialized = Evaluator . runResumable . runEvaluator runUnspecializedWith :: Carrier sig m => (forall resume . BaseError (UnspecializedError value) resume -> Evaluator term address value m resume) - -> Evaluator term address value (ResumableWithC (BaseError (UnspecializedError value)) (Evaluator term address value m)) a + -> Evaluator term address value (ResumableWithC (BaseError (UnspecializedError value)) (Eff m)) a -> Evaluator term address value m a -runUnspecializedWith f = runResumableWith f . runEvaluator +runUnspecializedWith f = Evaluator . runResumableWith (runEvaluator . f) . runEvaluator throwUnspecializedError :: ( Member (Resumable (BaseError (UnspecializedError value))) sig , Member (Reader ModuleInfo) sig