on master help sign in
Allow packages to compile together
commit1fc3e1123248da2290ed9e4262f21f1ff2973942 authorMichael Snoyman <michael@snoyman.com> dateTue 23 Jun 2015, 11:22 (11 years ago) parent725b03a
4 files changed+12−10
wai-app-static/WaiAppStatic/CmdLine.hs+7−5 wai-app-static/wai-app-static.cabal+1−1 wai-handler-launch/wai-handler-launch.cabal+1−1 wai-websockets/server.lhs+3−3
wai-app-static/WaiAppStatic/CmdLine.hs+7−5
@@ -8,7 +8,7 @@ module WaiAppStatic.CmdLine
88import Network.Wai (Middleware)
99import Network.Wai.Application.Static (staticApp, defaultFileServerSettings)
1010import Network.Wai.Handler.Warp
11− ( runSettings, defaultSettings, settingsHost, settingsPort
11+ ( runSettings, defaultSettings, setHost, setPort
1212 )
1313import Options.Applicative
1414import Text.Printf (printf)
@@ -100,10 +100,12 @@ runCommandLine middleware = do
100100 let middle = gzip def { gzipFiles = GzipCompress }
101101 . (if verbose then logStdout else id)
102102 . (middleware args)
103− runSettings defaultSettings
104− { settingsPort = port
105− , settingsHost = fromString host
106− } $ middle $ staticApp (defaultFileServerSettings $ fromString docroot)
103+ runSettings
104+ ( setPort port
105+ $ setHost (fromString host)
106+ defaultSettings
107+ )
108+ $ middle $ staticApp (defaultFileServerSettings $ fromString docroot)
107109 { ssIndices = if noindex then [] else mapMaybe (toPiece . pack) index
108110 , ssGetMimeType = return . mimeByExt mimeMap defaultMimeType . fromPiece . fileName
109111 }
wai-app-static/wai-app-static.cabal+1−1
@@ -51,7 +51,7 @@ library
5151 , filepath
5252 , wai-extra >= 3.0 && < 3.1
5353 , optparse-applicative >= 0.7
54− , warp >= 3.0.11 && < 3.1
54+ , warp >= 3.0.11 && < 3.2
5555 -- Used exclusively for hashFile function
5656 , cryptohash-conduit
5757
wai-handler-launch/wai-handler-launch.cabal+1−1
@@ -15,7 +15,7 @@ Library
1515 Exposed-modules: Network.Wai.Handler.Launch
1616 build-depends: base >= 4 && < 5
1717 , wai >= 3.0 && < 3.1
18− , warp >= 3.0 && < 3.1
18+ , warp >= 3.0 && < 3.2
1919 , http-types >= 0.7
2020 , transformers >= 0.2.2
2121 , bytestring >= 0.9.1.4
wai-websockets/server.lhs+3−3
@@ -76,9 +76,9 @@ actual server.
7676> main = do
7777> putStrLn "http://localhost:9160/client.html"
7878> state <- newMVar newServerState
79−> Warp.runSettings Warp.defaultSettings
80−> { Warp.settingsPort = 9160
81−> } $ WaiWS.websocketsOr WS.defaultConnectionOptions (application state) staticApp
79+> Warp.runSettings
80+> (Warp.setPort 9160 Warp.defaultSettings)
81+> $ WaiWS.websocketsOr WS.defaultConnectionOptions (application state) staticApp
8282
8383> staticApp :: Network.Wai.Application
8484> staticApp = Static.staticApp $ Static.embeddedSettings $(embedDir "static")