Maintainer | ongy |
---|---|
Stability | testing |
Portability | Linux |
Safe Haskell | None |
Language | Haskell2010 |
This module provides utility functions used in monky modules
- loopFd :: h -> Fd -> ([MonkyOut] -> IO ()) -> (h -> IO [MonkyOut]) -> IO ()
- convertUnit :: Int -> Text -> Text -> Text -> Text -> Text
- convertUnitB :: Integral a => a -> Text -> Text
- convertUnitSI :: Integral a => a -> Text -> Text
Documentation
:: h | Some kind of module handle |
-> Fd | The FD to block on |
-> ([MonkyOut] -> IO ()) | The update consume function |
-> (h -> IO [MonkyOut]) | The function to generate the output |
-> IO () | This will loop for you |
Utility Function for eventing modules
convertUnit :: Int -> Text -> Text -> Text -> Text -> Text Source #
Convert a number into a fixed length strings
convertUnitB :: Integral a => a -> Text -> Text Source #
Convert a number into a reasonable scale for binary units
convertUnitSI :: Integral a => a -> Text -> Text Source #
Convert a number into a reasonable scale for SI units