|
|
|
|
|
Description |
Utility functions
|
|
Synopsis |
|
|
|
|
Debug functions
|
|
debug :: Show a => a -> a | Source |
|
To be used only for debugging, breaks referential integrity.
|
|
Miscelaneous
|
|
commaJoin :: [String] -> String | Source |
|
Comma-join a string list.
|
|
sepSplit :: Char -> String -> [String] | Source |
|
Split a string on a separator and return an array.
|
|
|
Simple version of fst for a triple
|
|
Mathematical functions
|
|
varianceCoeff :: [Double] -> Double | Source |
|
The covariance of the list
|
|
JSON-related functions
|
|
fromJResult :: Monad m => Result a -> m a | Source |
|
Converts a JSON Result into a monadic value.
|
|
readEitherString :: Monad m => JSValue -> m String | Source |
|
Tries to read a string from a JSON value.
In case the value was not a string, we fail the read (in the
context of the current monad.
|
|
loadJSArray :: Monad m => String -> m [JSObject JSValue] | Source |
|
Converts a JSON message into an array of JSON objects.
|
|
fromObj :: (JSON a, Monad m) => String -> [(String, JSValue)] -> m a | Source |
|
Reads a the value of a key in a JSON object.
|
|
|
Annotate a Result with an ownership information
|
|
tryFromObj :: JSON a => String -> [(String, JSValue)] -> String -> Result a | Source |
|
Try to extract a key from a object with better error reporting
than fromObj
|
|
fromJVal :: (Monad m, JSON a) => JSValue -> m a | Source |
|
Small wrapper over readJSON.
|
|
asJSObject :: Monad m => JSValue -> m (JSObject JSValue) | Source |
|
Converts a JSON value into a JSON object.
|
|
asObjectList :: Monad m => [JSValue] -> m [JSObject JSValue] | Source |
|
Coneverts a list of JSON values into a list of JSON objects.
|
|
Parsing utility functions
|
|
parseChoices :: (Monad m, Read a) => String -> String -> [(a, String)] -> m a | Source |
|
Parse results from readsPrec
|
|
tryRead :: (Monad m, Read a) => String -> String -> m a | Source |
|
Safe read function returning data encapsulated in a Result.
|
|
formatTable :: [[String]] -> [Bool] -> [[String]] | Source |
|
Format a table of strings to maintain consistent length
|
|
Produced by Haddock version 2.4.2 |