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

Add Re-exports of relevant types #1

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ let
ref = "master";
rev = "15949d07dedbf95ad6536ac84be4d2f18dfa9523";
};
ghc = pkgs.haskell.packages.ghc883.override {
ghc = pkgs.haskell.packages.ghc884.override {
overrides = self: super: {
monad-control-identity = self.callCabal2nix "monad-control-identity" "${src-monad-control-identity}" {};
};
Expand Down
17 changes: 15 additions & 2 deletions src/Network/Wai/Handler/WebSockets/Trans.hs
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,27 @@ module Network.Wai.Handler.WebSockets.Trans (
-- * WebSocket
, websocketsOrT

-- * Websocket type Re-exports
, ServerApp
, ClientApp
, Connection
, ConnectionOptions
, PendingConnection
) where

import Control.Monad.Base
import Control.Monad.Base ( MonadBase(..) )
import Control.Monad.Trans.Control.Identity
import Network.Wai.Handler.WebSockets
( MonadBaseControlIdentity(..) )
import Network.Wai.Handler.WebSockets ( websocketsOr )
import Network.WebSockets
( ConnectionOptions,
ServerApp,
PendingConnection,
ClientApp,
Connection )

import Network.Wai.Trans
( MiddlewareT, liftApplication, runApplicationT )

-- | A type synonym for a websockets 'ServerApp' which has been lifted from the 'IO' monad.
type ServerAppT m = PendingConnection -> m ()
Expand Down
7 changes: 6 additions & 1 deletion src/Network/Wai/Trans.hs
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,16 @@ module Network.Wai.Trans (
, liftMiddleware
, runMiddlewareT

-- * Typeclass Re-exports
, MonadBase
, MonadBaseControlIdentity
) where

import Control.Monad.Base
import Control.Monad.Base ( MonadBase(liftBase) )
import Control.Monad.Trans.Control.Identity
( MonadBaseControlIdentity(..) )
import Network.Wai
( Application, Middleware, Request, Response, ResponseReceived )

-- | A type synonym for a wai 'Application' which has been lifted from the 'IO' monad.
type ApplicationT m = Request -> (Response -> m ResponseReceived) -> m ResponseReceived
Expand Down