Support building with socks-0.6 and persistant-template-2.7

persistent-template now needs UndecidableInstances.

socks changed defaultSocksConf to take a SockAddr.
This commit is contained in:
Joey Hess 2019-07-30 12:49:37 -04:00
parent 9fd37e65d0
commit 018b5b8173
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
7 changed files with 14 additions and 0 deletions

View file

@ -20,6 +20,7 @@ git-annex (7.20190730) upstream; urgency=medium
parsing.
* Drop support for building with ghc older than 8.4.4,
and with older versions of serveral haskell libraries.
* Support building with socks-0.6 and persistant-template-2.7.
* Corrected some license statements.
Thanks, Sean Whitton.

View file

@ -9,6 +9,7 @@
{-# LANGUAGE OverloadedStrings, GADTs, FlexibleContexts, EmptyDataDecls #-}
{-# LANGUAGE MultiParamTypeClasses, GeneralizedNewtypeDeriving #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE UndecidableInstances #-}
module Database.ContentIdentifier (
ContentIdentifierHandle,

View file

@ -9,6 +9,7 @@
{-# LANGUAGE OverloadedStrings, GADTs, FlexibleContexts #-}
{-# LANGUAGE MultiParamTypeClasses, GeneralizedNewtypeDeriving #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE UndecidableInstances #-}
module Database.Export (
ExportHandle,

View file

@ -9,6 +9,7 @@
{-# LANGUAGE OverloadedStrings, GADTs, FlexibleContexts #-}
{-# LANGUAGE MultiParamTypeClasses, GeneralizedNewtypeDeriving #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE UndecidableInstances #-}
module Database.Fsck (
FsckHandle,

View file

@ -9,6 +9,7 @@
{-# LANGUAGE OverloadedStrings, GADTs, FlexibleContexts #-}
{-# LANGUAGE MultiParamTypeClasses, GeneralizedNewtypeDeriving #-}
{-# LANGUAGE RankNTypes, ScopedTypeVariables #-}
{-# LANGUAGE UndecidableInstances #-}
module Database.Keys.SQL where

View file

@ -5,6 +5,8 @@
- Licensed under the GNU AGPL version 3 or higher.
-}
{-# LANGUAGE CPP #-}
module Utility.Tor where
import Common
@ -37,7 +39,12 @@ connectHiddenService (OnionAddress address) port = do
return s
where
torsocksport = 9050
#if MIN_VERSION_socks(0,6,0)
torsockconf = defaultSocksConf $ SockAddrInet torsocksport $
tupleToHostAddress (127,0,0,1)
#else
torsockconf = defaultSocksConf "127.0.0.1" torsocksport
#endif
socksdomain = SocksAddrDomainName (BU8.fromString address)
socksaddr = SocksAddress socksdomain (fromIntegral port)

View file

@ -3,3 +3,5 @@ The current Hackage version (7.20190615) only compiles with the constraints sock
The compiler errors can be fixed with the attached patches.
In the case of the socks changes (for Tor), I am not sure if it will actually work correctly.
> Found the necessary changes to get it to compile. [[done]] --[[Joey]]