Add a "timeout" command-line argument.
[haeredes.git] / src / Timeout.hs
1 {-# LANGUAGE DeriveDataTypeable #-}
2
3 -- | A newtype around the DNS query timeout, in seconds. Needed for
4 -- the 'Default' instance.
5 --
6 module Timeout
7 where
8
9 import Data.Data (Data)
10 import System.Console.CmdArgs.Default (Default(..))
11 import Data.Typeable (Typeable)
12
13 newtype Timeout =
14 Timeout { seconds :: Int }
15 deriving (Data, Show, Typeable)
16
17 instance Default Timeout where
18 def = Timeout 15