License | GPL-3 |
---|---|
Maintainer | marcelogmillani@gmail.com |
Stability | experimental |
Safe Haskell | Safe |
Language | Haskell2010 |
Loads a file or String
into a list of Description
s. Description
s with the same name are allowed.
Example file:
[item A] # the first item property 1 = value 1 # indentation is ignored property 2 = value 2 [item B] something=else # whitespaces after and before each value / property are ignored
- loadDescriptionFile :: FilePath -> String -> IO [Description]
- loadDescriptionString :: String -> String -> [Description]
- checkAttribute :: String -> (String -> Bool) -> Description -> Bool
- data Description = Description {}
Documentation
loadDescriptionFile :: FilePath -> String -> IO [Description] Source #
loads all descriptions from a file
usage: loadDescriptionFile filename defaultName
loads the given file, using defaultName
as the default description name in case the document doesn't start with the definition of one
loadDescriptionString :: String -> String -> [Description] Source #
loads all descriptions from a string
usage: loadDescriptionString string defaultName
behaves just like loadDescriptionFile, but receives a String
instead
checkAttribute :: String -> (String -> Bool) -> Description -> Bool Source #
checks if the specified attribute satisfies the given function, when it exists if the given attribute does not exist, returns False
data Description Source #