summaryrefslogtreecommitdiff
path: root/testkiki
diff options
context:
space:
mode:
authorAndrew Cady <d@jerkface.net>2019-07-13 15:22:45 -0400
committerAndrew Cady <d@jerkface.net>2019-07-13 15:41:12 -0400
commit006d1f0b7f36c25a91006fce24cbe76416fcee86 (patch)
treebf3e95582edf806677c6aaf56c825ba33c2c2974 /testkiki
parent495d9fbac3d633b768d910fced5cf00d00118fa0 (diff)
no cpp needed, since my love is unconditional
Diffstat (limited to 'testkiki')
-rw-r--r--testkiki/testkiki.hs18
1 files changed, 0 insertions, 18 deletions
diff --git a/testkiki/testkiki.hs b/testkiki/testkiki.hs
index 10487cf..9fffe7f 100644
--- a/testkiki/testkiki.hs
+++ b/testkiki/testkiki.hs
@@ -1,11 +1,7 @@
1{-# LANGUAGE OverloadedStrings #-} 1{-# LANGUAGE OverloadedStrings #-}
2{-# LANGUAGE DoAndIfThenElse #-} 2{-# LANGUAGE DoAndIfThenElse #-}
3{-# LANGUAGE CPP #-}
4{-# LANGUAGE ScopedTypeVariables #-} 3{-# LANGUAGE ScopedTypeVariables #-}
5{-# LANGUAGE TupleSections #-} 4{-# LANGUAGE TupleSections #-}
6#if !MIN_VERSION_base(4,7,0)
7import qualified System.Posix.Env
8#endif
9import System.Environment 5import System.Environment
10--import System.Posix.Env.ByteString (getEnv) 6--import System.Posix.Env.ByteString (getEnv)
11import System.Posix.Files 7import System.Posix.Files
@@ -24,30 +20,16 @@ import qualified Data.ByteString.Char8 as B
24import Data.Time.Clock 20import Data.Time.Clock
25import Data.Time.Clock.POSIX 21import Data.Time.Clock.POSIX
26import Data.IORef 22import Data.IORef
27#if !defined(VERSION_cryptonite)
28import Crypto.Hash.SHA1 (hash)
29#else
30import qualified Crypto.Hash 23import qualified Crypto.Hash
31import Crypto.Hash.Algorithms 24import Crypto.Hash.Algorithms
32import Data.ByteArray (convert) 25import Data.ByteArray (convert)
33#endif
34import System.IO.Unsafe (unsafePerformIO) 26import System.IO.Unsafe (unsafePerformIO)
35import ProcessUtils 27import ProcessUtils
36import Data.Bool 28import Data.Bool
37import Data.Char 29import Data.Char
38import KeyRing hiding (try) 30import KeyRing hiding (try)
39 31
40#if defined(VERSION_cryptonite)
41hash x = convert (Crypto.Hash.hash x :: Crypto.Hash.Digest SHA1) :: B.ByteString 32hash x = convert (Crypto.Hash.hash x :: Crypto.Hash.Digest SHA1) :: B.ByteString
42#endif
43
44#if !MIN_VERSION_base(4,7,0)
45setEnv k v = System.Posix.Env.setEnv k v True
46unsetEnv = System.Posix.Env.unsetEnv
47bool :: a -> a -> Bool -> a
48bool f _ False = f
49bool _ t True = t
50#endif
51 33
52data TestKikiSettings = TKS 34data TestKikiSettings = TKS
53 { gnupghome :: FilePath 35 { gnupghome :: FilePath