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

Remove withSocketsDo from examples #596

Merged
merged 1 commit into from
Jan 6, 2025
Merged
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
11 changes: 6 additions & 5 deletions Network/Socket.hs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
-- >
-- > -- from the "network-run" package.
-- > runTCPServer :: Maybe HostName -> ServiceName -> (Socket -> IO a) -> IO a
-- > runTCPServer mhost port server = withSocketsDo $ do
-- > runTCPServer mhost port server = do
-- > addr <- resolve
-- > E.bracket (open addr) close loop
-- > where
Expand Down Expand Up @@ -91,7 +91,7 @@
-- >
-- > -- from the "network-run" package.
-- > runTCPClient :: HostName -> ServiceName -> (Socket -> IO a) -> IO a
-- > runTCPClient host port client = withSocketsDo $ do
-- > runTCPClient host port client = do
-- > addr <- resolve
-- > E.bracket (open addr) close client
-- > where
Expand All @@ -108,9 +108,6 @@
-- threads vs a single 'Socket': one thread reads data from a 'Socket'
-- only and the other thread writes data to the 'Socket' only.
module Network.Socket (
-- * Initialisation
withSocketsDo,

-- * Address information
getAddrInfo,

Expand Down Expand Up @@ -396,11 +393,15 @@
waitAndCancelWriteSocketSTM,
) where

import Network.Socket.Buffer hiding (

Check warning on line 396 in Network/Socket.hs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 9.4)

Module ‘Network.Socket.Buffer’ does not export ‘withSocketsDo’

Check warning on line 396 in Network/Socket.hs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 9.4)

Module ‘Network.Socket.Buffer’ does not export ‘withSocketsDo’

Check warning on line 396 in Network/Socket.hs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 9.4)

Module ‘Network.Socket.Buffer’ does not export ‘withSocketsDo’

Check warning on line 396 in Network/Socket.hs

View workflow job for this annotation

GitHub Actions / build (macOS-latest, 9.4)

Module ‘Network.Socket.Buffer’ does not export ‘withSocketsDo’

Check warning on line 396 in Network/Socket.hs

View workflow job for this annotation

GitHub Actions / build (macOS-latest, 9.4)

Module ‘Network.Socket.Buffer’ does not export ‘withSocketsDo’

Check warning on line 396 in Network/Socket.hs

View workflow job for this annotation

GitHub Actions / build (macOS-latest, 9.6)

Module ‘Network.Socket.Buffer’ does not export ‘withSocketsDo’

Check warning on line 396 in Network/Socket.hs

View workflow job for this annotation

GitHub Actions / build (macOS-latest, 9.6)

Module ‘Network.Socket.Buffer’ does not export ‘withSocketsDo’

Check warning on line 396 in Network/Socket.hs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 9.6)

Module ‘Network.Socket.Buffer’ does not export ‘withSocketsDo’

Check warning on line 396 in Network/Socket.hs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 9.6)

Module ‘Network.Socket.Buffer’ does not export ‘withSocketsDo’

Check warning on line 396 in Network/Socket.hs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 9.6)

Module ‘Network.Socket.Buffer’ does not export ‘withSocketsDo’

Check warning on line 396 in Network/Socket.hs

View workflow job for this annotation

GitHub Actions / build (windows-latest, 9.4)

Module ‘Network.Socket.Buffer’ does not export ‘withSocketsDo’

Check warning on line 396 in Network/Socket.hs

View workflow job for this annotation

GitHub Actions / build (windows-latest, 9.4)

Module ‘Network.Socket.Buffer’ does not export ‘withSocketsDo’

Check warning on line 396 in Network/Socket.hs

View workflow job for this annotation

GitHub Actions / build (windows-latest, 9.4)

Module ‘Network.Socket.Buffer’ does not export ‘withSocketsDo’

Check warning on line 396 in Network/Socket.hs

View workflow job for this annotation

GitHub Actions / build (windows-latest, 9.6)

Module ‘Network.Socket.Buffer’ does not export ‘withSocketsDo’

Check warning on line 396 in Network/Socket.hs

View workflow job for this annotation

GitHub Actions / build (windows-latest, 9.6)

Module ‘Network.Socket.Buffer’ does not export ‘withSocketsDo’

Check warning on line 396 in Network/Socket.hs

View workflow job for this annotation

GitHub Actions / build (windows-latest, 9.6)

Module ‘Network.Socket.Buffer’ does not export ‘withSocketsDo’
recvBufFrom,
recvBufMsg,
sendBufMsg,
sendBufTo,

-- * Initialisation on Windows
withSocketsDo,

Check warning on line 403 in Network/Socket.hs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 9.8)

Module ‘Network.Socket.Buffer’ does not export ‘withSocketsDo’.

Check warning on line 403 in Network/Socket.hs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 9.8)

Module ‘Network.Socket.Buffer’ does not export ‘withSocketsDo’.

Check warning on line 403 in Network/Socket.hs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 9.8)

Module ‘Network.Socket.Buffer’ does not export ‘withSocketsDo’.

Check warning on line 403 in Network/Socket.hs

View workflow job for this annotation

GitHub Actions / build (macOS-latest, 9.8)

Module ‘Network.Socket.Buffer’ does not export ‘withSocketsDo’.

Check warning on line 403 in Network/Socket.hs

View workflow job for this annotation

GitHub Actions / build (windows-latest, 9.8)

Module ‘Network.Socket.Buffer’ does not export ‘withSocketsDo’.

Check warning on line 403 in Network/Socket.hs

View workflow job for this annotation

GitHub Actions / build (windows-latest, 9.8)

Module ‘Network.Socket.Buffer’ does not export ‘withSocketsDo’.

Check warning on line 403 in Network/Socket.hs

View workflow job for this annotation

GitHub Actions / build (windows-latest, 9.8)

Module ‘Network.Socket.Buffer’ does not export ‘withSocketsDo’.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a wrong position. It should be in front of where. I will fix this by myself.


)
import Network.Socket.Cbits
import Network.Socket.Fcntl
Expand All @@ -408,7 +409,7 @@
import Network.Socket.Handle
import Network.Socket.If
import Network.Socket.Info
import Network.Socket.Internal

Check warning on line 412 in Network/Socket.hs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 9.8)

The import of ‘Network.Socket.Internal’ is redundant

Check warning on line 412 in Network/Socket.hs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 9.8)

The import of ‘Network.Socket.Internal’ is redundant

Check warning on line 412 in Network/Socket.hs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 9.8)

The import of ‘Network.Socket.Internal’ is redundant

Check warning on line 412 in Network/Socket.hs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 9.4)

The import of ‘Network.Socket.Internal’ is redundant

Check warning on line 412 in Network/Socket.hs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 9.4)

The import of ‘Network.Socket.Internal’ is redundant

Check warning on line 412 in Network/Socket.hs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 9.4)

The import of ‘Network.Socket.Internal’ is redundant

Check warning on line 412 in Network/Socket.hs

View workflow job for this annotation

GitHub Actions / build (macOS-latest, 9.4)

The import of ‘Network.Socket.Internal’ is redundant

Check warning on line 412 in Network/Socket.hs

View workflow job for this annotation

GitHub Actions / build (macOS-latest, 9.4)

The import of ‘Network.Socket.Internal’ is redundant

Check warning on line 412 in Network/Socket.hs

View workflow job for this annotation

GitHub Actions / build (macOS-latest, 9.8)

The import of ‘Network.Socket.Internal’ is redundant

Check warning on line 412 in Network/Socket.hs

View workflow job for this annotation

GitHub Actions / build (macOS-latest, 9.6)

The import of ‘Network.Socket.Internal’ is redundant

Check warning on line 412 in Network/Socket.hs

View workflow job for this annotation

GitHub Actions / build (macOS-latest, 9.6)

The import of ‘Network.Socket.Internal’ is redundant

Check warning on line 412 in Network/Socket.hs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 9.6)

The import of ‘Network.Socket.Internal’ is redundant

Check warning on line 412 in Network/Socket.hs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 9.6)

The import of ‘Network.Socket.Internal’ is redundant

Check warning on line 412 in Network/Socket.hs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 9.6)

The import of ‘Network.Socket.Internal’ is redundant

Check warning on line 412 in Network/Socket.hs

View workflow job for this annotation

GitHub Actions / build (windows-latest, 9.4)

The import of ‘Network.Socket.Internal’ is redundant

Check warning on line 412 in Network/Socket.hs

View workflow job for this annotation

GitHub Actions / build (windows-latest, 9.4)

The import of ‘Network.Socket.Internal’ is redundant

Check warning on line 412 in Network/Socket.hs

View workflow job for this annotation

GitHub Actions / build (windows-latest, 9.4)

The import of ‘Network.Socket.Internal’ is redundant

Check warning on line 412 in Network/Socket.hs

View workflow job for this annotation

GitHub Actions / build (windows-latest, 9.6)

The import of ‘Network.Socket.Internal’ is redundant

Check warning on line 412 in Network/Socket.hs

View workflow job for this annotation

GitHub Actions / build (windows-latest, 9.6)

The import of ‘Network.Socket.Internal’ is redundant

Check warning on line 412 in Network/Socket.hs

View workflow job for this annotation

GitHub Actions / build (windows-latest, 9.6)

The import of ‘Network.Socket.Internal’ is redundant

Check warning on line 412 in Network/Socket.hs

View workflow job for this annotation

GitHub Actions / build (windows-latest, 9.8)

The import of ‘Network.Socket.Internal’ is redundant

Check warning on line 412 in Network/Socket.hs

View workflow job for this annotation

GitHub Actions / build (windows-latest, 9.8)

The import of ‘Network.Socket.Internal’ is redundant

Check warning on line 412 in Network/Socket.hs

View workflow job for this annotation

GitHub Actions / build (windows-latest, 9.8)

The import of ‘Network.Socket.Internal’ is redundant
import Network.Socket.Name hiding (getPeerName, getSocketName)
import Network.Socket.Options
import Network.Socket.STM
Expand Down
Loading