diff options
-rw-r--r-- | bittorrent/bittorrent.cabal | 2 | ||||
-rw-r--r-- | dht-client.cabal | 19 | ||||
-rw-r--r-- | src/Crypto/Tox.hs | 5 | ||||
-rw-r--r-- | src/Network/Tox/NodeId.hs | 4 | ||||
-rw-r--r-- | src/Network/Tox/Onion/Transport.hs | 4 |
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 | |||
6 | maintainer: Sam Truzjan <pxqr.sta@gmail.com> | 6 | maintainer: Sam Truzjan <pxqr.sta@gmail.com> |
7 | copyright: (c) 2013, Sam Truzjan | 7 | copyright: (c) 2013, Sam Truzjan |
8 | category: Network | 8 | category: Network |
9 | build-type: Simple | 9 | build-type: Custom |
10 | cabal-version: >= 1.10 | 10 | cabal-version: >= 1.10 |
11 | tested-with: GHC == 7.6.3 | 11 | tested-with: GHC == 7.6.3 |
12 | homepage: https://github.com/cobit/bittorrent | 12 | homepage: 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 | |||
6 | maintainer: Joe Crayne | 6 | maintainer: Joe Crayne |
7 | copyright: (c) 2017 Joe Crayne, (c) 2013, Sam Truzjan | 7 | copyright: (c) 2017 Joe Crayne, (c) 2013, Sam Truzjan |
8 | category: Network | 8 | category: Network |
9 | build-type: Simple | 9 | build-type: Custom |
10 | cabal-version: >= 1.10 | 10 | cabal-version: >= 1.10 |
11 | tested-with: GHC == 8.0.2 | 11 | tested-with: GHC == 8.0.2, GHC == 7.10.3 |
12 | homepage: https://github.com/cobit/bittorrent | 12 | homepage: https://github.com/cobit/bittorrent |
13 | bug-reports: https://github.com/cobit/bittorrent/issues | 13 | bug-reports: https://github.com/cobit/bittorrent/issues |
14 | synopsis: BitTorrent DHT protocol implementation. | 14 | synopsis: 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 | ||
47 | flag 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 | ||
51 | flag thread-debug | 51 | flag 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 | |||
59 | import qualified Data.ByteString.Char8 as C8 | 60 | import qualified Data.ByteString.Char8 as C8 |
60 | import Data.Data | 61 | import Data.Data |
61 | import Data.Functor.Contravariant | 62 | import Data.Functor.Contravariant |
63 | #if MIN_VERSION_base(4,9,1) | ||
62 | import Data.Kind | 64 | import Data.Kind |
65 | #else | ||
66 | import GHC.Exts (Constraint) | ||
67 | #endif | ||
63 | import Data.Ord | 68 | import Data.Ord |
64 | import Data.Serialize as S | 69 | import Data.Serialize as S |
65 | import Data.Word | 70 | import 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 -} |
17 | module Network.Tox.NodeId | 17 | module 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 #-} |
18 | module Network.Tox.Onion.Transport | 18 | module Network.Tox.Onion.Transport |
@@ -209,7 +209,7 @@ instance LessThanThree N0 | |||
209 | instance LessThanThree N1 | 209 | instance LessThanThree N1 |
210 | instance LessThanThree N2 | 210 | instance LessThanThree N2 |
211 | 211 | ||
212 | type family ThreeMinus n = r | r -> n where | 212 | type 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 |