Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
WeekDaze.Input.ConfigVersion
Description
AUTHOR
- Dr. Alistair Ward
DESCRIPTION
- Describes the version of the configuration-structure, & facilitates translation to & from a dotted-decimal string representation.
Synopsis
- type ConfigVersion = [Int]
- tag :: String
- elementTag :: String
- defaultConfigVersion :: ConfigVersion
- normalise :: ConfigVersion -> ConfigVersion
- fromString :: String -> ConfigVersion
- toString :: ConfigVersion -> String
Types
Type-synonyms
type ConfigVersion = [Int] Source #
The type of the version of the configuration-file format; major to minor.
Constants
elementTag :: String Source #
Used to qualify XML.
defaultConfigVersion :: ConfigVersion Source #
The default value for getConfigVersion
.
Functions
normalise :: ConfigVersion -> ConfigVersion Source #
Discard irrelevant trailing zeroes.
Translation
fromString :: String -> ConfigVersion Source #
- Splits a dotted-decimal string into a list of integers.
- CAVEAT: negative version-elements aren't accepted & trailing zeroes are dropped.
toString :: ConfigVersion -> String Source #
Represent a ConfigVersion as a dotted-decimal string.