Skip to content

Commit ad785c8

Browse files
committed
Fix accidental export of listenImpl
1 parent bc22682 commit ad785c8

File tree

1 file changed

+26
-4
lines changed

1 file changed

+26
-4
lines changed

src/Node/HTTP.purs

+26-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,28 @@
11
-- | This module defines low-level bindings to the Node HTTP module.
22

3-
module Node.HTTP where
3+
module Node.HTTP
4+
( Server
5+
, Request
6+
, Response
7+
, HTTP
8+
9+
, createServer
10+
, listen
11+
, ListenOptions
12+
, listenSocket
13+
14+
, httpVersion
15+
, requestHeaders
16+
, requestMethod
17+
, requestURL
18+
, requestAsStream
19+
20+
, setHeader
21+
, setHeaders
22+
, setStatusCode
23+
, setStatusMessage
24+
, responseAsStream
25+
) where
426

527
import Prelude
628

@@ -35,16 +57,16 @@ foreign import listenImpl :: forall eff. Server -> Int -> String -> Nullable Int
3557
listen :: forall eff. Server -> ListenOptions -> Eff (http :: HTTP | eff) Unit -> Eff (http :: HTTP | eff) Unit
3658
listen server opts done = listenImpl server opts.port opts.hostname (toNullable opts.backlog) done
3759

38-
-- | Listen on a unix socket. The specified callback will be run when setup is complete.
39-
foreign import listenSocket :: forall eff. Server -> String -> Eff (http :: HTTP | eff) Unit -> Eff (http :: HTTP | eff) Unit
40-
4160
-- | Options to be supplied to `listen`. See the [Node API](https://nodejs.org/dist/latest-v6.x/docs/api/http.html#http_server_listen_handle_callback) for detailed information about these.
4261
type ListenOptions =
4362
{ hostname :: String
4463
, port :: Int
4564
, backlog :: Maybe Int
4665
}
4766

67+
-- | Listen on a unix socket. The specified callback will be run when setup is complete.
68+
foreign import listenSocket :: forall eff. Server -> String -> Eff (http :: HTTP | eff) Unit -> Eff (http :: HTTP | eff) Unit
69+
4870
-- | Get the request HTTP version
4971
httpVersion :: Request -> String
5072
httpVersion = _.httpVersion <<< unsafeCoerce

0 commit comments

Comments
 (0)