summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bittorrent/bittorrent.cabal2
-rw-r--r--dht-client.cabal19
-rw-r--r--src/Crypto/Tox.hs5
-rw-r--r--src/Network/Tox/NodeId.hs4
-rw-r--r--src/Network/Tox/Onion/Transport.hs4
5 files changed, 21 insertions, 13 deletions
diff --git a/bittorrent/bittorrent.cabal b/bittorrent/bittorrent.cabal
index e2e6e804..8ec314e7 100644
--- a/bittorrent/bittorrent.cabal
+++ b/bittorrent/bittorrent.cabal
@@ -6,7 +6,7 @@ author: Sam Truzjan
6maintainer: Sam Truzjan <pxqr.sta@gmail.com> 6maintainer: Sam Truzjan <pxqr.sta@gmail.com>
7copyright: (c) 2013, Sam Truzjan 7copyright: (c) 2013, Sam Truzjan
8category: Network 8category: Network
9build-type: Simple 9build-type: Custom
10cabal-version: >= 1.10 10cabal-version: >= 1.10
11tested-with: GHC == 7.6.3 11tested-with: GHC == 7.6.3
12homepage: https://github.com/cobit/bittorrent 12homepage: https://github.com/cobit/bittorrent
diff --git a/dht-client.cabal b/dht-client.cabal
index 58024840..2b9026ad 100644
--- a/dht-client.cabal
+++ b/dht-client.cabal
@@ -6,9 +6,9 @@ author: Joe Crayne
6maintainer: Joe Crayne 6maintainer: Joe Crayne
7copyright: (c) 2017 Joe Crayne, (c) 2013, Sam Truzjan 7copyright: (c) 2017 Joe Crayne, (c) 2013, Sam Truzjan
8category: Network 8category: Network
9build-type: Simple 9build-type: Custom
10cabal-version: >= 1.10 10cabal-version: >= 1.10
11tested-with: GHC == 8.0.2 11tested-with: GHC == 8.0.2, GHC == 7.10.3
12homepage: https://github.com/cobit/bittorrent 12homepage: https://github.com/cobit/bittorrent
13bug-reports: https://github.com/cobit/bittorrent/issues 13bug-reports: https://github.com/cobit/bittorrent/issues
14synopsis: BitTorrent DHT protocol implementation. 14synopsis: BitTorrent DHT protocol implementation.
@@ -44,9 +44,9 @@ flag builder
44 description: Use older bytestring package and bytestring-builder. 44 description: Use older bytestring package and bytestring-builder.
45 default: False 45 default: False
46 46
47flag aeson 47-- flag aeson
48 description: Use aeson for pretty-printing bencoded data. 48-- description: Use aeson for pretty-printing bencoded data.
49 default: True 49-- default: True
50 50
51flag thread-debug 51flag thread-debug
52 description: Add instrumentation to threads. 52 description: Add instrumentation to threads.
@@ -132,6 +132,9 @@ library
132 , transformers-base 132 , transformers-base
133 , mtl 133 , mtl
134 134
135 if impl(ghc < 8)
136 Build-depends: transformers
137
135 if flag(network-uri) 138 if flag(network-uri)
136 Build-depends: network >= 2.6 139 Build-depends: network >= 2.6
137 , network-uri >= 2.6 140 , network-uri >= 2.6
@@ -154,9 +157,9 @@ library
154 157
155 C-sources: cbits/cryptonite_xsalsa.c, cbits/cryptonite_salsa.c 158 C-sources: cbits/cryptonite_xsalsa.c, cbits/cryptonite_salsa.c
156 159
157 if flag(aeson) 160 -- if flag(aeson)
158 build-depends: aeson, aeson-pretty, unordered-containers, vector 161 build-depends: aeson, aeson-pretty, unordered-containers, vector
159 cpp-options: -DBENCODE_AESON 162 cpp-options: -DBENCODE_AESON
160 if flag(thread-debug) 163 if flag(thread-debug)
161 exposed-modules: Control.Concurrent.Lifted.Instrument 164 exposed-modules: Control.Concurrent.Lifted.Instrument
162 Control.Concurrent.Async.Lifted.Instrument 165 Control.Concurrent.Async.Lifted.Instrument
diff --git a/src/Crypto/Tox.hs b/src/Crypto/Tox.hs
index effa8520..0df06054 100644
--- a/src/Crypto/Tox.hs
+++ b/src/Crypto/Tox.hs
@@ -1,3 +1,4 @@
1{-# LANGUAGE CPP #-}
1{-# LANGUAGE GeneralizedNewtypeDeriving #-} 2{-# LANGUAGE GeneralizedNewtypeDeriving #-}
2{-# LANGUAGE ScopedTypeVariables #-} 3{-# LANGUAGE ScopedTypeVariables #-}
3{-# LANGUAGE KindSignatures #-} 4{-# LANGUAGE KindSignatures #-}
@@ -59,7 +60,11 @@ import qualified Data.ByteString.Base16 as Base16
59import qualified Data.ByteString.Char8 as C8 60import qualified Data.ByteString.Char8 as C8
60import Data.Data 61import Data.Data
61import Data.Functor.Contravariant 62import Data.Functor.Contravariant
63#if MIN_VERSION_base(4,9,1)
62import Data.Kind 64import Data.Kind
65#else
66import GHC.Exts (Constraint)
67#endif
63import Data.Ord 68import Data.Ord
64import Data.Serialize as S 69import Data.Serialize as S
65import Data.Word 70import Data.Word
diff --git a/src/Network/Tox/NodeId.hs b/src/Network/Tox/NodeId.hs
index d9d7cfbc..959d689c 100644
--- a/src/Network/Tox/NodeId.hs
+++ b/src/Network/Tox/NodeId.hs
@@ -1,4 +1,4 @@
1{-# LANGUAGE ApplicativeDo #-} 1{- LANGUAGE ApplicativeDo -}
2{-# LANGUAGE BangPatterns #-} 2{-# LANGUAGE BangPatterns #-}
3{-# LANGUAGE CPP #-} 3{-# LANGUAGE CPP #-}
4{-# LANGUAGE DataKinds #-} 4{-# LANGUAGE DataKinds #-}
@@ -13,7 +13,7 @@
13{-# LANGUAGE PatternSynonyms #-} 13{-# LANGUAGE PatternSynonyms #-}
14{-# LANGUAGE ScopedTypeVariables #-} 14{-# LANGUAGE ScopedTypeVariables #-}
15{-# LANGUAGE TupleSections #-} 15{-# LANGUAGE TupleSections #-}
16{-# LANGUAGE TypeApplications #-} 16{- LANGUAGE TypeApplications -}
17module Network.Tox.NodeId 17module Network.Tox.NodeId
18 ( NodeInfo(..) 18 ( NodeInfo(..)
19 , NodeId 19 , NodeId
diff --git a/src/Network/Tox/Onion/Transport.hs b/src/Network/Tox/Onion/Transport.hs
index a521c39e..2b4df5af 100644
--- a/src/Network/Tox/Onion/Transport.hs
+++ b/src/Network/Tox/Onion/Transport.hs
@@ -12,7 +12,7 @@
12{-# LANGUAGE StandaloneDeriving #-} 12{-# LANGUAGE StandaloneDeriving #-}
13{-# LANGUAGE TupleSections #-} 13{-# LANGUAGE TupleSections #-}
14{-# LANGUAGE TypeFamilies #-} 14{-# LANGUAGE TypeFamilies #-}
15{-# LANGUAGE TypeFamilyDependencies #-} 15{- LANGUAGE TypeFamilyDependencies -}
16{-# LANGUAGE TypeOperators #-} 16{-# LANGUAGE TypeOperators #-}
17{-# LANGUAGE UndecidableInstances #-} 17{-# LANGUAGE UndecidableInstances #-}
18module Network.Tox.Onion.Transport 18module Network.Tox.Onion.Transport
@@ -209,7 +209,7 @@ instance LessThanThree N0
209instance LessThanThree N1 209instance LessThanThree N1
210instance LessThanThree N2 210instance LessThanThree N2
211 211
212type family ThreeMinus n = r | r -> n where 212type family ThreeMinus n where
213 ThreeMinus N3 = N0 213 ThreeMinus N3 = N0
214 ThreeMinus N2 = N1 214 ThreeMinus N2 = N1
215 ThreeMinus N1 = N2 215 ThreeMinus N1 = N2