weekdaze-0.0.0.3: A school-timetable problem-solver.

Safe HaskellSafe
LanguageHaskell2010

WeekDaze.Input.ConfigVersion

Contents

Description

AUTHOR
Dr. Alistair Ward
DESCRIPTION
Describes the version of the configuration-structure, & facilitates translation to & from a dotted-decimal string representation.
Synopsis

Types

Type-synonyms

type ConfigVersion = [Int] Source #

The type of the version of the configuration-file format; major to minor.

Constants

tag :: String Source #

Used to qualify SQL & XML.

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.