Tweak some Haddock syntax.
This commit is contained in:
parent
30816b60ac
commit
f95bcf6411
7
Utils.hs
7
Utils.hs
|
@ -46,13 +46,14 @@ joinPath base new
|
||||||
"." -> new
|
"." -> new
|
||||||
dir -> dir ++ new
|
dir -> dir ++ new
|
||||||
|
|
||||||
-- | Given a monadic action wrapped in a Maybe, run it if there's one there;
|
-- | Given a monadic action wrapped in a `Maybe`, run it if there's one there;
|
||||||
-- if it's Nothing, then do nothing.
|
-- if it's `Nothing`, then do nothing.
|
||||||
doMaybe :: Monad m => Maybe (m ()) -> m ()
|
doMaybe :: Monad m => Maybe (m ()) -> m ()
|
||||||
doMaybe (Just a) = a
|
doMaybe (Just a) = a
|
||||||
doMaybe Nothing = return ()
|
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 :: (a -> c) -> (b -> d) -> Either a b -> Either c d
|
||||||
transformEither funcLeft funcRight x = case x of
|
transformEither funcLeft funcRight x = case x of
|
||||||
Left l -> Left (funcLeft l)
|
Left l -> Left (funcLeft l)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user