|
|
|
Description |
General utility functions that do not depend on other functions
in Web modules
|
|
Synopsis |
|
|
|
Documentation |
|
utf8 :: String -> ByteString | Source |
|
Takes a String and returns UTF8 ByteString
|
|
|
:: | | => [a -> a] | List of functions
| -> a | Initial value
| -> a | | Apply a list of transformation functions to a value
|
|
|
with :: a -> [a -> a] -> a | Source |
|
Same as apply with arguments flipped
|
|
exactParse :: (Read a, Monad m) => String -> m a | Source |
|
Parse a value, or fail if the entire string cannot be parsed
Note that this relies on reads, which appears to be buggy for Int
-- it works something like parsing as Integer, then wrapping to a 32 bit
Int. The Param instance for Int has fixed this, so you can
use capture instead.
|
|
nullToNothing :: String -> Maybe String | Source |
|
Converts empty string to Nothing, everything else wrapped in Just
|
|
|
Return current time as a UNIX timestamp
|
|
randomStr :: Int -> IO String | Source |
|
Returns a randomly generated string of length n
|
|
Produced by Haddock version 2.4.2 |