Tweak some Haddock syntax.

This commit is contained in:
Adam Sampson 2007-08-20 23:44:10 +00:00
parent 30816b60ac
commit f95bcf6411

View File

@ -46,13 +46,14 @@ joinPath base new
"." -> new
dir -> dir ++ new
-- | Given a monadic action wrapped in a Maybe, run it if there's one there;
-- if it's Nothing, then do nothing.
-- | Given a monadic action wrapped in a `Maybe`, run it if there's one there;
-- if it's `Nothing`, then do nothing.
doMaybe :: Monad m => Maybe (m ()) -> m ()
doMaybe (Just a) = a
doMaybe Nothing = return ()
-- | Transforms between two Either types using the appropriate convert function:
-- | Transforms between two `Either` types using the appropriate convert
-- function:
transformEither :: (a -> c) -> (b -> d) -> Either a b -> Either c d
transformEither funcLeft funcRight x = case x of
Left l -> Left (funcLeft l)