diff --git a/library/ListT.hs b/library/ListT.hs index 9acc4b8..7cf368e 100644 --- a/library/ListT.hs +++ b/library/ListT.hs @@ -108,11 +108,6 @@ instance Monad m => Monoid (ListT m a) where return Nothing mappend = (<>) --- A slightly stricter version of Data.Bifunctor.bimap. --- There's no benefit to producing lazy pairs here. -bimapPair' :: (a -> b) -> (c -> d) -> (a, c) -> (b, d) -bimapPair' f g = \(a,c) -> (f a, g c) - instance Functor m => Functor (ListT m) where fmap f = go where diff --git a/library/ListT/Prelude.hs b/library/ListT/Prelude.hs index 806c226..46e1e56 100644 --- a/library/ListT/Prelude.hs +++ b/library/ListT/Prelude.hs @@ -1,6 +1,7 @@ module ListT.Prelude ( module Exports, + bimapPair', ) where @@ -77,3 +78,9 @@ import Text.ParserCombinators.ReadPrec as Exports (ReadPrec, readPrec_to_P, read import Text.Printf as Exports (printf, hPrintf) import Text.Read as Exports (Read(..), readMaybe, readEither) import Unsafe.Coerce as Exports + +-- | +-- A slightly stricter version of Data.Bifunctor.bimap. +-- There's no benefit to producing lazy pairs here. +bimapPair' :: (a -> b) -> (c -> d) -> (a, c) -> (b, d) +bimapPair' f g = \(a,c) -> (f a, g c)