Various helper routines.
- type Seconds = Int
- type EpochSeconds = Int64
- epochSeconds :: CalendarTime -> EpochSeconds
- eSecsToCalTime :: EpochSeconds -> IO CalendarTime
- epochPico :: CalendarTime -> Integer
- logMC :: Priority -> String -> IO ()
- hPutLine :: Handle -> String -> IO ()
- hGetLn :: Handle -> IO String
- ltrim :: String -> String
- rtrim :: String -> String
- trim :: String -> String
- unBracket :: String -> String
- splitList :: Eq a => a -> [a] -> [[a]]
- splitListBy :: (a -> Bool) -> [a] -> [[a]]
- split :: (a -> Bool) -> [a] -> ([a], [a])
- mbReadFile :: a -> (String -> a) -> FilePath -> IO a
- doSnd :: (a -> b) -> (c, a) -> (c, b)
- doFst :: (a -> b) -> (a, c) -> (b, c)
- mapFst :: (a -> b) -> [(a, x)] -> [(b, x)]
- mapSnd :: (a -> b) -> [(x, a)] -> [(x, b)]
- revmap :: a -> [a -> b] -> [b]
- comp :: Ord t => (a -> t) -> a -> a -> Ordering
- runCommand :: String -> [String] -> IO ()
- debug :: Show a => String -> a -> a
- debugM :: Monad m => String -> m ()
- readM :: (Monad m, Read t) => String -> m t
- maybeM :: Monad m => Maybe a -> m a
- boolM :: MonadPlus m => Bool -> m Bool
- notMb :: a -> Maybe a -> Maybe a
- periodic :: [Int] -> IO () -> IO ThreadId
- periodic' :: [Int] -> IO a -> IO a
Put a line into a handle followed by rn and echo to stdout
Split is like break, but the matching element is dropped.
Read file with a default value if the file does not exist.
Run an external command. Upon failure print status to stderr.
Unsafe tracing, outputs the message and the value to stderr.