Safe Haskell | Safe |
---|---|
Language | Haskell98 |
Functionality related to index storage and the DefaultList type.
- indicesRef :: Text
- parseIndices :: Text -> [Int]
- unparseIndices :: [Int] -> Text
- data DefaultList a = DefaultList a [a]
- defaultListIndex :: DefaultList a -> Int -> a
Documentation
indicesRef :: Text Source #
Key used to store list indices
parseIndices :: Text -> [Int] Source #
Parse a string of comma-delimited integers to a list. Unparseable substrings are left out of the result.
unparseIndices :: [Int] -> Text Source #
Serialize a list of integers as a comma-delimited Text
data DefaultList a Source #
A list which, when indexed on non-existant positions, returns a default value.
DefaultList a [a] |
defaultListIndex :: DefaultList a -> Int -> a Source #
Safe indexing of a DefaultList - returns the default value if the given index is out of bounds.