From 2ba4b6fb3d29b2b65aa60f4bd591ed8cf6a63e27 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 26 Feb 2017 15:27:22 -0400 Subject: Added ConfigurableValue type class * Added ConfigurableValue type class, for values that can be used in a config file, or to otherwise configure a program. * The val function converts such values to String. This was motivated by the bug caused by type Port = Int changing to newtype Port = Port Int deriving Show After that change, some things that used show port to generate config files were broken. By using the ConfigurableValue type class instead, such breakage can be prevented. --- src/Propellor/Types.hs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/Propellor/Types.hs') diff --git a/src/Propellor/Types.hs b/src/Propellor/Types.hs index 23066c18..097c332d 100644 --- a/src/Propellor/Types.hs +++ b/src/Propellor/Types.hs @@ -36,6 +36,7 @@ module Propellor.Types ( , adjustPropertySatisfy -- * Other included types , module Propellor.Types.OS + , module Propellor.Types.ConfigurableValue , module Propellor.Types.Dns , module Propellor.Types.Result , module Propellor.Types.ZFS @@ -46,6 +47,7 @@ import Data.Monoid import Propellor.Types.Core import Propellor.Types.Info import Propellor.Types.OS +import Propellor.Types.ConfigurableValue import Propellor.Types.Dns import Propellor.Types.Result import Propellor.Types.MetaTypes -- cgit v1.2.3