From 5ad4603614704bcca92a89ecf655d6a551f4f8ac Mon Sep 17 00:00:00 2001 From: Sam Truzjan Date: Thu, 17 Oct 2013 09:59:20 +0400 Subject: Remove containers dependency --- src/Network/KRPC.hs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/Network/KRPC.hs') diff --git a/src/Network/KRPC.hs b/src/Network/KRPC.hs index 27363515..b6e14bb0 100644 --- a/src/Network/KRPC.hs +++ b/src/Network/KRPC.hs @@ -125,7 +125,6 @@ import Data.BEncode.BDict as BE import Data.BEncode.Types as BE import Data.ByteString.Char8 as BC import Data.List as L -import Data.Map as M import Data.Monoid import Data.Typeable import Network @@ -359,9 +358,6 @@ server :: (MonadBaseControl IO remote, MonadIO remote) -> remote () server servAddr handlers = do remoteServer servAddr $ \addr q -> do - case dispatch (queryMethod q) of + case L.lookup (queryMethod q) handlers of Nothing -> return $ Left $ MethodUnknown (queryMethod q) Just m -> m addr q - where - handlerMap = M.fromList handlers - dispatch s = M.lookup s handlerMap -- cgit v1.2.3