summaryrefslogtreecommitdiff
path: root/src/Propellor/Types/Dns.hs
diff options
context:
space:
mode:
authorJoey Hess2014-12-07 17:09:55 -0400
committerJoey Hess2014-12-07 17:09:55 -0400
commit42a0c832483296fb111279fc3512a3dfd44f2089 (patch)
tree328c20c8a34e908806d240ec2dd5a02437c8df6b /src/Propellor/Types/Dns.hs
parent5a932c382d4cbe65957eb0d3ebe4a9319d8dfd14 (diff)
Display a warning when ensureProperty is used on a property which has Info and is so prevented from propigating it.
Would much rather a type-based fixed, but this is all I have for now.
Diffstat (limited to 'src/Propellor/Types/Dns.hs')
-rw-r--r--src/Propellor/Types/Dns.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Propellor/Types/Dns.hs b/src/Propellor/Types/Dns.hs
index 66fbd1a4..5e9666d8 100644
--- a/src/Propellor/Types/Dns.hs
+++ b/src/Propellor/Types/Dns.hs
@@ -1,6 +1,7 @@
module Propellor.Types.Dns where
import Propellor.Types.OS (HostName)
+import Propellor.Types.Empty
import Data.Word
import Data.Monoid
@@ -108,5 +109,8 @@ instance Monoid NamedConfMap where
(Secondary, Master) -> o
_ -> n
+instance Empty NamedConfMap where
+ isEmpty (NamedConfMap m) = isEmpty m
+
fromNamedConfMap :: NamedConfMap -> M.Map Domain NamedConf
fromNamedConfMap (NamedConfMap m) = m