From 42a0c832483296fb111279fc3512a3dfd44f2089 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 7 Dec 2014 17:09:55 -0400 Subject: 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. --- src/Propellor/Types/Dns.hs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/Propellor/Types/Dns.hs') 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 -- cgit v1.2.3