diff options
author | Yann Herklotz <git@yannherklotz.com> | 2019-06-29 20:21:43 +0100 |
---|---|---|
committer | Yann Herklotz <git@yannherklotz.com> | 2019-06-29 20:21:43 +0100 |
commit | bb697f8bc7b593e5aabb43505f686e6503b7726f (patch) | |
tree | e25f874fa5b68224337b016e1d17ef45204e45c0 /src/VeriFuzz/Result.hs | |
parent | 8734d40f4842065ce5a579eb0cc77171bbd436b0 (diff) | |
download | verismith-bb697f8bc7b593e5aabb43505f686e6503b7726f.tar.gz verismith-bb697f8bc7b593e5aabb43505f686e6503b7726f.zip |
Fix pedantic warnings
Diffstat (limited to 'src/VeriFuzz/Result.hs')
-rw-r--r-- | src/VeriFuzz/Result.hs | 5 |
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) } |