Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run fourmolu #99

Merged
merged 1 commit into from
Nov 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion Network/HTTP2/Arch/Context.hs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,13 @@ data Context = Context
----------------------------------------------------------------

newContext
:: RoleInfo -> Int -> BufferSize -> SockAddr -> SockAddr -> SettingsList -> IO Context
:: RoleInfo
-> Int
-> BufferSize
-> SockAddr
-> SockAddr
-> SettingsList
-> IO Context
newContext rinfo cacheSiz siz mysa peersa settingAlist =
Context rl rinfo settingAlist
<$> newIORef False
Expand Down
4 changes: 2 additions & 2 deletions Network/HTTP2/Arch/Settings.hs
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ pendingMySettings Context{mySettingAlist, myFirstSettings, myPendingAlist} = do
frame1 = settingsFrame id mySettingAlist
-- Initial window update for connection
frames = case lookup SettingsInitialWindowSize mySettingAlist of
Nothing -> []
Just winSiz -> [windowUpdateFrame 0 (winSiz - defaultWindowSize)]
Nothing -> []
Just winSiz -> [windowUpdateFrame 0 (winSiz - defaultWindowSize)]
frames' = frame1 : frames

----------------------------------------------------------------
Expand Down
11 changes: 9 additions & 2 deletions Network/HTTP2/Client/Run.hs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ data ClientConfig = ClientConfig
-- ^ The maximum number of incoming streams on the net
, windowSize :: WindowSize
-- ^ The window size of incoming streams
} deriving (Eq, Show)
}
deriving (Eq, Show)

-- | The default client config.
--
Expand Down Expand Up @@ -81,7 +82,13 @@ setup ClientConfig{..} conf@Config{..} = do
let clientInfo = newClientInfo scheme authority
myAlist = makeMySettingsList conf concurrentStreams windowSize
ctx <-
newContext clientInfo cacheLimit confBufferSize confMySockAddr confPeerSockAddr myAlist
newContext
clientInfo
cacheLimit
confBufferSize
confMySockAddr
confPeerSockAddr
myAlist
mgr <- start confTimeoutManager
exchangeSettings ctx
return (ctx, mgr)
Expand Down
9 changes: 7 additions & 2 deletions Network/HTTP2/Server.hs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ module Network.HTTP2.Server (
run',

-- * Client configuration
ServerConfig(..),
ServerConfig (..),
defaultServerConfig,

-- * Common configuration
Expand Down Expand Up @@ -112,7 +112,12 @@ import Network.HPACK
import Network.HPACK.Token
import Network.HTTP2.Arch
import Network.HTTP2.Frame.Types
import Network.HTTP2.Server.Run (run, run', ServerConfig(..), defaultServerConfig)
import Network.HTTP2.Server.Run (
ServerConfig (..),
defaultServerConfig,
run,
run',
)
import Network.HTTP2.Server.Types

----------------------------------------------------------------
Expand Down
6 changes: 4 additions & 2 deletions Network/HTTP2/Server/Run.hs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ data ServerConfig = ServerConfig
-- ^ The maximum number of incoming streams on the net
, windowSize :: WindowSize
-- ^ The window size of incoming streams
} deriving (Eq, Show)
}
deriving (Eq, Show)

-- | The default server config.
--
Expand Down Expand Up @@ -98,7 +99,8 @@ setup :: ServerConfig -> Config -> IO (Context, Manager)
setup ServerConfig{..} conf@Config{..} = do
serverInfo <- newServerInfo
let myAlist = makeMySettingsList conf concurrentStreams windowSize
ctx <- newContext serverInfo 0 confBufferSize confMySockAddr confPeerSockAddr myAlist
ctx <-
newContext serverInfo 0 confBufferSize confMySockAddr confPeerSockAddr myAlist
-- Workers, worker manager and timer manager
mgr <- start confTimeoutManager
return (ctx, mgr)
Expand Down
Loading