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 includes from .cabal-file for Windows #583

Merged
merged 2 commits into from
Jun 26, 2024
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
2 changes: 0 additions & 2 deletions network.cabal
Original file line number Diff line number Diff line change
@@ -123,10 +123,8 @@ library

default-language: Haskell2010
include-dirs: include
includes: HsNet.h HsNetDef.h alignment.h win32defs.h
install-includes: HsNet.h HsNetDef.h alignment.h win32defs.h
if os(windows)
includes: afunix_compat.h
install-includes: afunix_compat.h

ghc-options: -Wall -fwarn-tabs

Unchanged files with check annotations Beta

import Network.Socket
import System.Directory
import System.Timeout (timeout)
import Test.Hspec

Check warning on line 41 in tests/Network/Test/Common.hs

GitHub Actions / build (windows-latest, 8.4)

The import of ‘Test.Hspec’ is redundant

Check warning on line 41 in tests/Network/Test/Common.hs

GitHub Actions / build (windows-latest, 8.4)

The import of ‘Test.Hspec’ is redundant

Check warning on line 41 in tests/Network/Test/Common.hs

GitHub Actions / build (windows-latest, 9.4)

The import of ‘Test.Hspec’ is redundant

Check warning on line 41 in tests/Network/Test/Common.hs

GitHub Actions / build (windows-latest, 9.4)

The import of ‘Test.Hspec’ is redundant

Check warning on line 41 in tests/Network/Test/Common.hs

GitHub Actions / build (windows-latest, 9.6)

The import of ‘Test.Hspec’ is redundant

Check warning on line 41 in tests/Network/Test/Common.hs

GitHub Actions / build (windows-latest, 9.6)

The import of ‘Test.Hspec’ is redundant

Check warning on line 41 in tests/Network/Test/Common.hs

GitHub Actions / build (windows-latest, 9.8)

The import of ‘Test.Hspec’ is redundant

Check warning on line 41 in tests/Network/Test/Common.hs

GitHub Actions / build (windows-latest, 9.8)

The import of ‘Test.Hspec’ is redundant
serverAddr :: String
serverAddr = "127.0.0.1"
resolveClient :: SocketType -> HostName -> PortNumber -> IO AddrInfo
resolveClient socketType host port =
head <$> getAddrInfo (Just hints) (Just host) (Just $ show port)

Check warning on line 247 in tests/Network/Test/Common.hs

GitHub Actions / build (ubuntu-latest, 9.8)

In the use of ‘head’

Check warning on line 247 in tests/Network/Test/Common.hs

GitHub Actions / build (macOS-latest, 9.8)

In the use of ‘head’

Check warning on line 247 in tests/Network/Test/Common.hs

GitHub Actions / build (windows-latest, 9.8)

In the use of ‘head’

Check warning on line 247 in tests/Network/Test/Common.hs

GitHub Actions / build (windows-latest, 9.8)

In the use of ‘head’
where
hints = defaultHints {
addrSocketType = socketType
resolveServer :: SocketType -> HostName -> IO AddrInfo
resolveServer socketType host =
head <$> getAddrInfo (Just hints) (Just host) Nothing

Check warning on line 256 in tests/Network/Test/Common.hs

GitHub Actions / build (ubuntu-latest, 9.8)

In the use of ‘head’

Check warning on line 256 in tests/Network/Test/Common.hs

GitHub Actions / build (macOS-latest, 9.8)

In the use of ‘head’

Check warning on line 256 in tests/Network/Test/Common.hs

GitHub Actions / build (windows-latest, 9.8)

In the use of ‘head’

Check warning on line 256 in tests/Network/Test/Common.hs

GitHub Actions / build (windows-latest, 9.8)

In the use of ‘head’
where
hints = defaultHints {
addrSocketType = socketType
cmsgidGen = biasedGen (\g -> CmsgId <$> g <*> g) cmsgidPatterns arbitrary
genFds :: Gen [Fd]
genFds = listOf (Fd <$> arbitrary)

Check warning on line 426 in tests/Network/SocketSpec.hs

GitHub Actions / build (windows-latest, 8.4)

Defined but not used: ‘genFds’

Check warning on line 426 in tests/Network/SocketSpec.hs

GitHub Actions / build (windows-latest, 8.4)

Defined but not used: ‘genFds’

Check warning on line 426 in tests/Network/SocketSpec.hs

GitHub Actions / build (windows-latest, 9.4)

Defined but not used: ‘genFds’

Check warning on line 426 in tests/Network/SocketSpec.hs

GitHub Actions / build (windows-latest, 9.4)

Defined but not used: ‘genFds’

Check warning on line 426 in tests/Network/SocketSpec.hs

GitHub Actions / build (windows-latest, 9.6)

Defined but not used: ‘genFds’

Check warning on line 426 in tests/Network/SocketSpec.hs

GitHub Actions / build (windows-latest, 9.6)

Defined but not used: ‘genFds’

Check warning on line 426 in tests/Network/SocketSpec.hs

GitHub Actions / build (windows-latest, 9.8)

Defined but not used: ‘genFds’

Check warning on line 426 in tests/Network/SocketSpec.hs

GitHub Actions / build (windows-latest, 9.8)

Defined but not used: ‘genFds’
-- pruned lists of pattern synonym values for each type to generate values from
#endif
#if defined(mingw32_HOST_OS)
import Foreign (FunPtr)

Check warning on line 14 in Network/Socket/Syscall.hs

GitHub Actions / build (windows-latest, 9.4)

The import of ‘Foreign’ is redundant

Check warning on line 14 in Network/Socket/Syscall.hs

GitHub Actions / build (windows-latest, 9.4)

The import of ‘Foreign’ is redundant

Check warning on line 14 in Network/Socket/Syscall.hs

GitHub Actions / build (windows-latest, 9.4)

The import of ‘Foreign’ is redundant

Check warning on line 14 in Network/Socket/Syscall.hs

GitHub Actions / build (windows-latest, 9.6)

The import of ‘Foreign’ is redundant

Check warning on line 14 in Network/Socket/Syscall.hs

GitHub Actions / build (windows-latest, 9.6)

The import of ‘Foreign’ is redundant

Check warning on line 14 in Network/Socket/Syscall.hs

GitHub Actions / build (windows-latest, 9.6)

The import of ‘Foreign’ is redundant

Check warning on line 14 in Network/Socket/Syscall.hs

GitHub Actions / build (windows-latest, 9.8)

The import of ‘Foreign’ is redundant

Check warning on line 14 in Network/Socket/Syscall.hs

GitHub Actions / build (windows-latest, 9.8)

The import of ‘Foreign’ is redundant

Check warning on line 14 in Network/Socket/Syscall.hs

GitHub Actions / build (windows-latest, 9.8)

The import of ‘Foreign’ is redundant
import GHC.Conc (asyncDoProc)
#else
import Foreign.C.Error (getErrno, eINTR, eINPROGRESS)