| Portability | portable |
|---|---|
| Stability | provisional |
| Maintainer | John Goerzen <jgoerzen@complete.org> |
Data.ConfigFile.Types
Description
Internal types for Data.ConfigFile. This module is not intended to be used directly by your programs.
Copyright (c) 2004-2008 John Goerzen, jgoerzen@complete.org
- type CPOptions = Map OptionSpec String
- type CPData = Map SectionSpec CPOptions
- data CPErrorData
- type CPError = (CPErrorData, String)
- data ConfigParser = ConfigParser {
- content :: CPData
- optionxform :: OptionSpec -> OptionSpec
- defaulthandler :: ConfigParser -> SectionSpec -> OptionSpec -> Either CPError String
- usedefault :: Bool
- accessfunc :: ConfigParser -> SectionSpec -> OptionSpec -> Either CPError String
- type SectionSpec = String
- type OptionSpec = String
- type ParseOutput = [(String, [(String, String)])]
Documentation
type CPOptions = Map OptionSpec StringSource
Storage of options.
type CPData = Map SectionSpec CPOptionsSource
The main data storage type (storage of sections).
PLEASE NOTE: This type is exported only for use by other modules under
Data.ConfigFile. You should NEVER access the FiniteMap in a ConfigParser
directly. This type may change in future releases of MissingH, which could
break your programs. Please retrict yourself to the interface in
Data.ConfigFile.
data CPErrorData Source
Possible ConfigParser errors.
Constructors
| ParseError String | Parse error |
| SectionAlreadyExists SectionSpec | Attempt to create an already-existing ection |
| NoSection SectionSpec | The section does not exist |
| NoOption OptionSpec | The option does not exist |
| OtherProblem String | Miscellaneous error |
| InterpolationError String | Raised by |
Instances
type CPError = (CPErrorData, String)Source
Indicates an error occurred. The String is an explanation of the location of the error.
data ConfigParser Source
This is the main record that is used by Data.ConfigFile.
Constructors
| ConfigParser | |
Fields
| |
type SectionSpec = StringSource
Names of sections
type OptionSpec = StringSource
Names of options
type ParseOutput = [(String, [(String, String)])]Source
Internal output from parser