X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2FMxList.hs;h=ce0e6490c3bd2d64c26beff26574151cc5d31e67;hb=refs%2Fheads%2Fmaster;hp=d79307da86a42e459f9cf2ffa5f13449cefbfbc1;hpb=e3ef76e60ddd54e5fad787c5883533d2410b3e2a;p=list-remote-forwards.git diff --git a/src/MxList.hs b/src/MxList.hs index d79307d..6a03870 100644 --- a/src/MxList.hs +++ b/src/MxList.hs @@ -5,7 +5,8 @@ -- instance of Configured for [String] if we had defined one in -- e.g. 'OptionalConfiguration'. -- -module MxList +module MxList ( + MxList( MxList, get_mxs ) ) where -- DC is needed only for the DCT.Configured instance of String. @@ -15,21 +16,22 @@ import qualified Data.Configurator.Types as DCT ( Value( List ), convert ) import Data.Data (Data) -import System.Console.CmdArgs.Default (Default(..)) -import Data.Typeable (Typeable) +import System.Console.CmdArgs.Default ( Default( def ) ) -- | A (wrapper around a) list of MX hostnames. -- newtype MxList = MxList { get_mxs :: [String] } - deriving (Data, Show, Typeable) + deriving (Data, Show) -- | The default (empty) list of MXes. +-- instance Default MxList where def = MxList [] + instance DCT.Configured MxList where -- | This allows us to read a MxList object out of a Configurator -- config file. By default Configurator wouldn't know what to do,