Skip to content

Commit ca84ef2

Browse files
ygaleyitz-zoomin
andauthored
Allow newer versions of network library (#24)
Allow newer versions of network library so that it can compile under newer resolvers Co-authored-by: Yitz Gale <[email protected]>
1 parent 6fe62d9 commit ca84ef2

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-6
lines changed

HaskellNet-SSL.cabal

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: HaskellNet-SSL
22
synopsis: Helpers to connect to SSL/TLS mail servers with HaskellNet
3-
version: 0.3.4.1
3+
version: 0.3.4.2
44
description: This package ties together the HaskellNet and connection
55
packages to make it easy to open IMAP and SMTP connections
66
over SSL.
@@ -15,10 +15,14 @@ build-type: Simple
1515
cabal-version: >=1.8
1616
data-files: README.md
1717

18-
Flag NoUpperBounds
18+
flag NoUpperBounds
1919
Description: Removes upper bounds from all packages
2020
Default: False
2121

22+
flag network-bsd
23+
description: Get Network.BSD from the network-bsd package
24+
default: True
25+
2226
source-repository head
2327
type: git
2428
location: git://github.com/dpwright/HaskellNet-SSL.git
@@ -36,14 +40,17 @@ library
3640
HaskellNet >= 0.3,
3741
tls >= 1.2,
3842
connection >= 0.2.7,
39-
network >= 2.4,
4043
bytestring,
4144
data-default
4245
else
4346
build-depends: base >= 4 && < 5,
4447
HaskellNet >= 0.3 && < 0.6,
45-
tls >= 1.2 && < 1.5,
46-
connection >= 0.2.7 && < 0.3,
47-
network >= 2.4 && < 2.9,
48+
tls >= 1.2 && < 1.6,
49+
connection >= 0.2.7 && < 0.4,
4850
bytestring,
4951
data-default
52+
if flag(network-bsd)
53+
build-depends: network >= 3.0,
54+
network-bsd >= 2.7
55+
else
56+
build-depends: network >= 2.4 && < 3.0

src/Network/HaskellNet/SSL.hs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
1+
{-# LANGUAGE CPP #-}
12
module Network.HaskellNet.SSL
23
( Settings (..)
34
, defaultSettingsWithPort
45
) where
56

7+
#if MIN_VERSION_network(3,0,0)
8+
import Network.Socket (PortNumber)
9+
#else
610
import Network.Socket.Internal (PortNumber)
11+
#endif
712

813
data Settings = Settings
914
{ sslPort :: PortNumber

0 commit comments

Comments
 (0)