Safe Haskell | None |
---|---|

Language | Haskell2010 |

## Synopsis

- nonNegative :: (Num a, Ord a) => a -> a
- positive :: Int -> Int
- spaces :: Int -> Text
- showPack :: Show a => a -> Text
- loopWhileM :: Monad m => m Bool -> m () -> m ()
- whenJust :: (Monad m, Monoid b) => Maybe a -> (a -> m b) -> m b
- leftToJust :: Either a b -> Maybe a
- withMaybe :: Maybe a -> b -> (a -> b) -> b
- withEither :: Either a b -> (a -> c) -> (b -> c) -> c
- whenLeft :: (Monad m, Monoid b) => Either a b -> (a -> m b) -> m b
- safeHead :: [a] -> Maybe a
- safeTail :: [a] -> Maybe [a]
- fromLines :: [Text] -> Text
- hush :: Either e a -> Maybe a
- throwMaybe :: Monad m => MaybeT m a
- addElapsedP :: ElapsedP -> ElapsedP -> ElapsedP
- checkExecutables :: [String] -> IO [String]
- isYes :: String -> Bool

# Documentation

nonNegative :: (Num a, Ord a) => a -> a Source #

loopWhileM :: Monad m => m Bool -> m () -> m () Source #

leftToJust :: Either a b -> Maybe a Source #

withEither :: Either a b -> (a -> c) -> (b -> c) -> c Source #

throwMaybe :: Monad m => MaybeT m a Source #