Skip to content

Commit 9fc09c3

Browse files
committed
Add Haddocks about exceptions thrown when compiling to wasm
1 parent 492577b commit 9fc09c3

File tree

4 files changed

+10
-2
lines changed

4 files changed

+10
-2
lines changed

network-mux/src/Network/Mux/Channel.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,8 @@ socketAsChannel socket =
313313
---
314314
--- This is primarily for testing purposes since it does not allow actual IPC.
315315
---
316+
-- __Exceptions:__
317+
-- May throw 'IOError' when compiling to @wasm@.
316318
createSocketConnectedChannels :: Socket.Family -- ^ Usually AF_UNIX or AF_INET
317319
-> IO (ByteChannel IO,
318320
ByteChannel IO)

ouroboros-network/demo/connection-manager.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,8 @@ optionParser =
647647
<> showDefault
648648
)
649649

650-
650+
-- | __Exceptions:__
651+
-- May throw 'IOError' when compiling to @wasm@.
651652
run :: (Addr, Port)
652653
-> (Addr, Port)
653654
-> DiffTime -- ^ protocol idle timeout

ouroboros-network/framework/lib/Ouroboros/Network/Snocket.hs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,8 @@ type SocketSnocket = Snocket IO Socket SockAddr
346346
-- | Create a 'Snocket' for the given 'Socket.Family'. In the 'bind' method set
347347
-- 'Socket.ReuseAddr` and 'Socket.ReusePort'.
348348
--
349+
-- __Exceptions:__
350+
-- May throw 'IOError' when compiling to @wasm@.
349351
socketSnocket
350352
:: IOManager
351353
-- ^ 'IOManager' interface. We use it when we create a new socket and when we
@@ -452,6 +454,8 @@ type LocalSnocket = Snocket IO LocalSocket LocalAddress
452454
-- around this, the address passed to 'open' via 'LocalFamily' will be
453455
-- referenced by 'LocalSocket'.
454456
--
457+
-- __Exceptions:__
458+
-- May throw 'IOError' when compiling to @wasm@.
455459
localSnocket :: IOManager -> LocalSnocket
456460
#if defined(mingw32_HOST_OS)
457461
localSnocket ioManager = Snocket {

ouroboros-network/tests/io/Test/Ouroboros/Network/Socket.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,8 @@ prop_socket_demo :: TestBlockChainAndUpdates -> Property
185185
prop_socket_demo (TestBlockChainAndUpdates chain updates) =
186186
ioProperty $ demo chain updates
187187

188-
188+
-- | __Exceptions:__
189+
-- May throw 'IOError' when compiling to @wasm@.
189190
demo :: forall block .
190191
( Chain.HasHeader block
191192
, Serialise (Chain.HeaderHash block)

0 commit comments

Comments
 (0)