From 6dc94202a991b716be72acdc5cee367b2e8ef081 Mon Sep 17 00:00:00 2001 From: Kazu Yamamoto Date: Mon, 24 Oct 2011 13:40:01 +0900 Subject: hlint. --- SimpleServer.hs | 4 ++-- TestProtocol.hs | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/SimpleServer.hs b/SimpleServer.hs index b01d864..401e7f4 100644 --- a/SimpleServer.hs +++ b/SimpleServer.hs @@ -48,7 +48,7 @@ proxyRequest Conf{..} rc req = do parseResponse responseEnum responseIter rs <- makeResolvSeed rc - withResolver rs $ \r -> do + withResolver rs $ \r -> (>>= check) <$> timeout' "proxy timeout" timeOut (worker r) where ident = identifier . header $ req @@ -59,7 +59,7 @@ proxyRequest Conf{..} rc req = do else trace "identifier not match" Nothing {-- - - 先尝试本地查询,查询不到就代理到真正的dns服务器 + - TBD --} handleRequest :: Conf -> ResolvConf -> DNSFormat -> IO (Maybe DNSFormat) handleRequest conf rc req = maybe (proxyRequest conf rc req) (trace "return A record" $ return . Just) mresponse diff --git a/TestProtocol.hs b/TestProtocol.hs index cef00ee..ee839d9 100644 --- a/TestProtocol.hs +++ b/TestProtocol.hs @@ -7,7 +7,6 @@ import Network.DNS.Internal import Network.DNS.Query import Network.DNS.Response import Data.IP -import Control.Monad.State import Test.Framework (defaultMain, testGroup, Test) import Test.Framework.Providers.HUnit import Test.HUnit hiding (Test) @@ -17,7 +16,7 @@ tests = [ testGroup "Test case" [ testCase "QueryA" (test_Format testQueryA) , testCase "QueryAAAA" (test_Format testQueryAAAA) - , testCase "ResponseA" (test_Format $ testResponseA) + , testCase "ResponseA" (test_Format testResponseA) ] ] -- cgit v1.2.3