Portability | portable |
---|---|

Stability | stable |

Safe Haskell | Safe-Infered |

Various utility bits and pieces.

- io :: MonadIO m => IO a -> m a
- fi :: (Integral a, Num b) => a -> b
- err :: MonadIO m => String -> m ()
- upcase :: String -> String
- downcase :: String -> String
- hsv2rgb :: Fractional a => (Integer, a, a) -> (a, a, a)
- wrap :: String -> String -> String
- quote :: String -> String
- clamp :: Ord a => a -> a -> a -> a
- mapAccumLM :: Monad m => (acc -> x -> m (acc, y)) -> acc -> [x] -> m (acc, [y])
- ifM :: Monad m => m Bool -> m a -> m a -> m a

# Documentation

fi :: (Integral a, Num b) => a -> bSource

Short-hand for `fromIntegral`

hsv2rgb :: Fractional a => (Integer, a, a) -> (a, a, a)Source

Conversion scheme as in http:en.wikipedia.org*wiki*HSV_color_space

mapAccumLM :: Monad m => (acc -> x -> m (acc, y)) -> acc -> [x] -> m (acc, [y])Source

The `mapAccumLM`

function behaves like a combination of `mapM`

and
`foldlM`

; it applies a monadic function to each element of a list,
passing an accumulating parameter from left to right, and returning
a final value of this accumulator together with the new list.