From c53a6aa511e4835bdbf5bed5d795d1a6277cd714 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Tue, 23 Oct 2018 11:30:58 -0400 Subject: [PATCH] Interpose with an upcast. --- src/Data/Abstract/Value/Concrete.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Data/Abstract/Value/Concrete.hs b/src/Data/Abstract/Value/Concrete.hs index 059b1d7a6..ea30a1e95 100644 --- a/src/Data/Abstract/Value/Concrete.hs +++ b/src/Data/Abstract/Value/Concrete.hs @@ -163,10 +163,10 @@ instance ( Member (Reader ModuleInfo) sig interpose :: (Member eff sig, HFunctor eff, Carrier sig m) - => (forall v. eff m (m v) -> m v) - -> Eff (InterposeC eff m) a - -> m a -interpose handler = runInterposeC handler . interpret + => (forall v. eff (Eff m) (Eff m v) -> Eff m v) + -> Eff m a + -> Eff m a +interpose handler = runInterposeC handler . interpret . upcast upcast :: Eff m a -> Eff (InterposeC eff (Eff m)) a upcast m = Eff (\ k -> InterposeC (\ f -> m >>= runInterposeC f . k))