summaryrefslogtreecommitdiffhomepage
path: root/Network/DNS/Internal.hs
diff options
context:
space:
mode:
authorGravatar Kazu Yamamoto <kazu@iij.ad.jp>2010-05-07 15:25:20 +0900
committerGravatar Kazu Yamamoto <kazu@iij.ad.jp>2010-05-07 15:25:20 +0900
commit907f236b1fa936493eeb21c054b439483a34e8ae (patch)
treea2a64d31e42ee34fbbcdb8d5d3d3cb329e9ab25c /Network/DNS/Internal.hs
parentf058a1be787eaadc41f53785cadb058edf20762b (diff)
hlint.
Diffstat (limited to 'Network/DNS/Internal.hs')
-rw-r--r--Network/DNS/Internal.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/Network/DNS/Internal.hs b/Network/DNS/Internal.hs
index 0f53b80..ccc8cf7 100644
--- a/Network/DNS/Internal.hs
+++ b/Network/DNS/Internal.hs
@@ -3,6 +3,7 @@ module Network.DNS.Internal where
import qualified Data.ByteString.Lazy.Char8 as L
import Data.Char
import Data.IP
+import Data.Maybe
----------------------------------------------------------------
@@ -37,10 +38,10 @@ rookup key ((x,y):xys)
| otherwise = rookup key xys
intToType :: Int -> TYPE
-intToType n = maybe (UNKNOWN n) id $ rookup n rrDB
+intToType n = fromMaybe (UNKNOWN n) $ rookup n rrDB
typeToInt :: TYPE -> Int
typeToInt (UNKNOWN x) = x
-typeToInt t = maybe 0 id $ lookup t rrDB
+typeToInt t = fromMaybe 0 $ lookup t rrDB
toType :: String -> TYPE
toType = read . map toUpper
@@ -105,7 +106,7 @@ data Question = Question {
Making "Question".
-}
makeQuestion :: Domain -> TYPE -> Question
-makeQuestion dom typ = Question dom typ
+makeQuestion = Question
----------------------------------------------------------------