Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- toInt :: forall a b. (Num b, Integral b, Coercible a b) => a -> Int
- t2s :: Coercible a Text => a -> String
- asyncWait :: Time -> IO ()
- dropCommand :: ByteString -> ByteString
- dropSubCommand :: ByteString -> ByteString
- toBS :: String -> ByteString
- fromBS :: ByteString -> String
- bsToText :: ByteString -> Text
- textToBS :: Text -> ByteString
- processError :: SomeException -> IO ByteString
- handleErrorMaybe :: IO ByteString -> IO ByteString
Documentation
dropCommand :: ByteString -> ByteString Source #
If input starts with /
drop the whole command with a space and return the remaining part.
dropSubCommand :: ByteString -> ByteString Source #
Drop not only command but sub-command too.
toBS :: String -> ByteString Source #
Cast UTF-8 String
to ByteString
.
fromBS :: ByteString -> String Source #
Cast UTF-8 ByteString
to String
.
bsToText :: ByteString -> Text Source #
Cast UTF-8 ByteString
to Text
.
textToBS :: Text -> ByteString Source #
Cast UTF-8 ByteString
to Text
.
processError :: SomeException -> IO ByteString Source #
Cast some exception to ByteString
.
handleErrorMaybe :: IO ByteString -> IO ByteString Source #
Wrap IO action with processError
and return error message as ByteString
.