Skip to content

Commit

Permalink
Merge pull request #27 from k0001/fix-warnings
Browse files Browse the repository at this point in the history
Export Control.Error.Util.(?:) and fix compiler warnings
  • Loading branch information
Gabriella439 committed Mar 21, 2014
2 parents e47f34d + d780f2b commit 1ab4e49
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions Control/Error/Util.hs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ module Control.Error.Util (
-- * Bool
bool,

-- * Maybe
(?:),

-- * MaybeT
maybeT,
just,
Expand Down Expand Up @@ -56,9 +59,6 @@ import Data.Maybe (fromMaybe)
import System.Exit (ExitCode)
import System.IO (hPutStr, hPutStrLn, stderr)

-- For Documentation
import Data.EitherR (fmapL, fmapLT)

{- $conversion
Use these functions to convert between 'Maybe', 'Either', 'MaybeT', and
'EitherT'.
Expand Down Expand Up @@ -154,7 +154,9 @@ isLeft = either (const True) (const False)
isRight :: Either a b -> Bool
isRight = either (const False) (const True)

-- | 'fmap' specialized to 'Either', given a name symmetric to 'fmapL'
{- | 'fmap' specialized to 'Either', given a name symmetric to
'Data.EitherR.fmapL'
-}
fmapR :: (a -> b) -> Either l a -> Either l b
fmapR = fmap

Expand Down Expand Up @@ -194,7 +196,9 @@ isRightT :: (Monad m) => EitherT a m b -> m Bool
isRightT = eitherT (\_ -> return False) (\_ -> return True)
{-# INLINABLE isRightT #-}

-- | 'fmap' specialized to 'EitherT', given a name symmetric to 'fmapLT'
{- | 'fmap' specialized to 'EitherT', given a name symmetric to
'Data.EitherR.fmapLT'
-}
fmapRT :: (Monad m) => (a -> b) -> EitherT l m a -> EitherT l m b
fmapRT = liftM

Expand Down

0 comments on commit 1ab4e49

Please sign in to comment.