propellor-4.0.6: property-based host configuration management in haskell

Safe HaskellSafe
LanguageHaskell98

Propellor.Types.ConfigurableValue

Synopsis

Documentation

class ConfigurableValue t where Source #

A value that can be used in a configuration file, or otherwise used to configure a program.

Unlike Show, there should only be instances of this type class for values that have a standard serialization that is understood outside of Haskell code.

When converting a type alias such as "type Foo = String" or "type Foo = Int" to a newtype, it's unsafe to derive a Show instance, because there may be code that shows the type to configure a value. Instead, define a ConfigurableValue instance.

Minimal complete definition

val

Methods

val :: t -> String Source #

Instances

ConfigurableValue Double Source # 

Methods

val :: Double -> String Source #

ConfigurableValue Float Source # 

Methods

val :: Float -> String Source #

ConfigurableValue Int Source # 

Methods

val :: Int -> String Source #

ConfigurableValue Integer Source # 

Methods

val :: Integer -> String Source #

ConfigurableValue Word8 Source # 

Methods

val :: Word8 -> String Source #

ConfigurableValue Word16 Source # 

Methods

val :: Word16 -> String Source #

ConfigurableValue Word32 Source # 

Methods

val :: Word32 -> String Source #

ConfigurableValue String Source #

val String does not do any quoting, unlike show String

Methods

val :: String -> String Source #

ConfigurableValue Port Source # 

Methods

val :: Port -> String Source #

ConfigurableValue Group Source # 

Methods

val :: Group -> String Source #

ConfigurableValue User Source # 

Methods

val :: User -> String Source #

ConfigurableValue FBSDVersion Source # 
ConfigurableValue IPAddr Source # 

Methods

val :: IPAddr -> String Source #

ConfigurableValue ZDataset Source # 

Methods

val :: ZDataset -> String Source #

ConfigurableValue AptSource Source # 

Methods

val :: AptSource -> String Source #

ConfigurableValue PPA Source # 

Methods

val :: PPA -> String Source #

ConfigurableValue Frequency Source # 

Methods

val :: Frequency -> String Source #

ConfigurableValue ICMPTypeMatch Source # 
ConfigurableValue Chain Source # 

Methods

val :: Chain -> String Source #

ConfigurableValue Target Source # 

Methods

val :: Target -> String Source #

ConfigurableValue Table Source # 

Methods

val :: Table -> String Source #

ConfigurableValue IPWithMask Source # 
ConfigurableValue ReportLevel Source # 
ConfigurableValue ResticRepo Source # 
ConfigurableValue SbuildSchroot Source # 
ConfigurableValue PoudriereArch Source #