Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Ganeti.THH.Field
Description
Helpers for creating various kinds of Field
s.
They aren't directly needed for the Template Haskell code in Ganeti.THH, so better keep them in a separate module.
Synopsis
- specialNumericalField :: Name -> Field -> Field
- timeAsDoubleField :: String -> Field
- timeStampFields :: [Field]
- uuidFields :: [Field]
- serialFields :: [Field]
- newtype TagSet = TagSet {
- unTagSet :: Set String
- emptyTagSet :: TagSet
- tagsFields :: [Field]
- fileModeAsIntField :: String -> Field
- processIdField :: String -> Field
Documentation
specialNumericalField :: Name -> Field -> Field #
Sets the read function to also accept string parsable by the given function.
timeAsDoubleField :: String -> Field #
Creates a new mandatory field that reads time as the (floating point)
number of seconds since the standard UNIX epoch, and represents it in
Haskell as ClockTime
.
timeStampFields :: [Field] #
Timestamp fields description.
uuidFields :: [Field] #
UUID fields description.
serialFields :: [Field] #
Serial number fields description.
emptyTagSet :: TagSet #
Empty tag set value.
tagsFields :: [Field] #
Tag field description.
fileModeAsIntField :: String -> Field #
Creates a new mandatory field that reads a file mode in the standard
POSIX file mode representation. The Haskell type of the field is FileMode
.
processIdField :: String -> Field #
Creates a new mandatory field that contains a POSIX process ID.