aboutsummaryrefslogtreecommitdiffstats
path: root/src/VeriFuzz/Result.hs
diff options
context:
space:
mode:
authorYann Herklotz <git@yannherklotz.com>2019-06-29 20:21:43 +0100
committerYann Herklotz <git@yannherklotz.com>2019-06-29 20:21:43 +0100
commitbb697f8bc7b593e5aabb43505f686e6503b7726f (patch)
treee25f874fa5b68224337b016e1d17ef45204e45c0 /src/VeriFuzz/Result.hs
parent8734d40f4842065ce5a579eb0cc77171bbd436b0 (diff)
downloadverismith-bb697f8bc7b593e5aabb43505f686e6503b7726f.tar.gz
verismith-bb697f8bc7b593e5aabb43505f686e6503b7726f.zip
Fix pedantic warnings
Diffstat (limited to 'src/VeriFuzz/Result.hs')
-rw-r--r--src/VeriFuzz/Result.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/VeriFuzz/Result.hs b/src/VeriFuzz/Result.hs
index 77aa5b3..c02690f 100644
--- a/src/VeriFuzz/Result.hs
+++ b/src/VeriFuzz/Result.hs
@@ -31,6 +31,7 @@ import Control.Monad.Base
import Control.Monad.IO.Class
import Control.Monad.Trans.Class
import Control.Monad.Trans.Control
+import Data.Bifunctor (Bifunctor (..))
import Shelly (RunFailed (..), Sh, catch_sh)
import Shelly.Lifted (MonadSh, liftSh)
@@ -64,6 +65,10 @@ instance Monad (Result a) where
instance MonadBase (Result a) (Result a) where
liftBase = id
+instance Bifunctor Result where
+ bimap a _ (Fail c) = Fail $ a c
+ bimap _ b (Pass c) = Pass $ b c
+
-- | The transformer for the 'Result' type. This
newtype ResultT a m b = ResultT { runResultT :: m (Result a b) }