From: PHO Date: Wed, 30 Nov 2011 15:51:29 +0000 (+0900) Subject: hlint X-Git-Url: http://git.cielonegro.org/gitweb.cgi?a=commitdiff_plain;h=950640d;p=Lucu.git hlint Ditz-issue: e0312227f40a0fa92d4c5d69a64dad473f54389a --- diff --git a/Network/HTTP/Lucu/Httpd.hs b/Network/HTTP/Lucu/Httpd.hs index 0d78f98..a5f9749 100644 --- a/Network/HTTP/Lucu/Httpd.hs +++ b/Network/HTTP/Lucu/Httpd.hs @@ -41,7 +41,7 @@ import Prelude.Unicode -- tree :: 'ResourceTree' -- tree = C.fromList [ ([], 'nonGreedy' helloWorld) ] -- in --- 'Network.withSocketsDo' '$' 'runHttpd' config '$' 'resourceMap' tree +-- 'Network.withSocketsDo' '.' 'runHttpd' config '$' 'resourceMap' tree -- -- helloWorld :: 'Network.HTTP.Lucu.Resource' -- helloWorld = C.fromList diff --git a/Network/HTTP/Lucu/Resource/Internal.hs b/Network/HTTP/Lucu/Resource/Internal.hs index f5b54a9..a19339c 100644 --- a/Network/HTTP/Lucu/Resource/Internal.hs +++ b/Network/HTTP/Lucu/Resource/Internal.hs @@ -271,7 +271,7 @@ getRequest = niRequest <$> getInteraction -- main :: 'IO' () -- main = let tree :: 'Network.HTTP.Lucu.ResourceTree' -- tree = 'fromList' [ (["foo"], 'Network.HTTP.Lucu.greedy' resFoo) ] --- in 'Network.HTTP.Lucu.runHttpd' 'defaultConfig' $ 'Network.HTTP.Lucu.resourceMap' tree +-- in 'Network.withSocketsDo' '.' 'Network.HTTP.Lucu.runHttpd' 'defaultConfig' $ 'Network.HTTP.Lucu.resourceMap' tree -- -- resFoo :: 'Resource' -- resFoo = 'singleton' diff --git a/examples/Implanted.hs b/examples/Implanted.hs index 03bcbdb..34878a0 100644 --- a/examples/Implanted.hs +++ b/examples/Implanted.hs @@ -5,6 +5,7 @@ import qualified Data.Collections as C import MiseRafturai import Network import Network.HTTP.Lucu +import Prelude.Unicode main ∷ IO () main = let config = defaultConfig { cnfServerPort = "9999" } @@ -12,4 +13,4 @@ main = let config = defaultConfig { cnfServerPort = "9999" } tree = C.fromList [ ([], nonGreedy miseRafturai) ] in do putStrLn "Access http://localhost:9999/ with your browser." - withSocketsDo $ runHttpd config $ resourceMap tree + withSocketsDo ∘ runHttpd config $ resourceMap tree diff --git a/examples/ImplantedSmall.hs b/examples/ImplantedSmall.hs index ba9b5b9..fe45b89 100644 --- a/examples/ImplantedSmall.hs +++ b/examples/ImplantedSmall.hs @@ -4,6 +4,7 @@ import qualified Data.Collections as C import Network import Network.HTTP.Lucu +import Prelude.Unicode import SmallFile main ∷ IO () @@ -12,4 +13,4 @@ main = let config = defaultConfig { cnfServerPort = "9999" } tree = C.fromList [ ([], nonGreedy smallFile) ] in do putStrLn "Access http://localhost:9999/ with your browser." - withSocketsDo $ runHttpd config $ resourceMap tree + withSocketsDo ∘ runHttpd config $ resourceMap tree diff --git a/examples/Multipart.hs b/examples/Multipart.hs index e827ae6..906eff5 100644 --- a/examples/Multipart.hs +++ b/examples/Multipart.hs @@ -10,6 +10,7 @@ import Data.Maybe import Data.Monoid.Unicode import Network import Network.HTTP.Lucu +import Prelude.Unicode main ∷ IO () main = let config = defaultConfig { cnfServerPort = "9999" } @@ -17,7 +18,7 @@ main = let config = defaultConfig { cnfServerPort = "9999" } tree = C.fromList [ ([], nonGreedy resMain) ] in do putStrLn "Access http://localhost:9999/ with your browser." - withSocketsDo $ runHttpd config $ resourceMap tree + withSocketsDo ∘ runHttpd config $ resourceMap tree resMain ∷ Resource resMain = C.fromList diff --git a/examples/SSL.hs b/examples/SSL.hs index aa8b3a5..f78b6c2 100644 --- a/examples/SSL.hs +++ b/examples/SSL.hs @@ -17,6 +17,7 @@ import OpenSSL.EVP.PKey import OpenSSL.RSA import qualified OpenSSL.Session as SSL import OpenSSL.X509 +import Prelude.Unicode main ∷ IO () main = withOpenSSL $ @@ -38,7 +39,7 @@ main = withOpenSSL $ tree ∷ ResourceTree tree = C.fromList [ ([], nonGreedy helloWorld) ] putStrLn "Access https://localhost:9001/ with your browser." - withSocketsDo $ runHttpd config $ resourceMap tree + withSocketsDo ∘ runHttpd config $ resourceMap tree helloWorld ∷ Resource helloWorld