From e1061999a129238414f969466b6a535c991bdabf Mon Sep 17 00:00:00 2001 From: Sandy Maguire Date: Wed, 20 Mar 2019 00:39:13 -0400 Subject: [PATCH] inline error actions --- src/Polysemy/Error.hs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Polysemy/Error.hs b/src/Polysemy/Error.hs index af67fd1..c84d697 100644 --- a/src/Polysemy/Error.hs +++ b/src/Polysemy/Error.hs @@ -40,6 +40,7 @@ instance Effect (Error e) where throw :: Member (Error e) r => e -> Semantic r a throw = send . Throw +{-# INLINE throw #-} catch @@ -48,6 +49,7 @@ catch -> (e -> Semantic r a) -> Semantic r a catch try handle = send $ Catch try handle id +{-# INLINE catch #-} runError :: Semantic (Error e ': r) a -> Semantic r (Either e a)