X-Git-Url: http://gitweb.michael.orlitzky.com/?p=haeredes.git;a=blobdiff_plain;f=src%2FTimeout.hs;fp=src%2FTimeout.hs;h=6f0f3d4d991417f56c409bbe6731c0580de81437;hp=0000000000000000000000000000000000000000;hb=f9610a6d357f2ed79f2f18baa477244970f8b40f;hpb=95bd7958d5a3483ba2cbe232765138a7785b2429 diff --git a/src/Timeout.hs b/src/Timeout.hs new file mode 100644 index 0000000..6f0f3d4 --- /dev/null +++ b/src/Timeout.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE DeriveDataTypeable #-} + +-- | A newtype around the DNS query timeout, in seconds. Needed for +-- the 'Default' instance. +-- +module Timeout +where + +import Data.Data (Data) +import System.Console.CmdArgs.Default (Default(..)) +import Data.Typeable (Typeable) + +newtype Timeout = + Timeout { seconds :: Int } + deriving (Data, Show, Typeable) + +instance Default Timeout where + def = Timeout 15