diff options
author | Andrew Cady <d@jerkface.net> | 2019-07-13 15:22:45 -0400 |
---|---|---|
committer | Andrew Cady <d@jerkface.net> | 2019-07-13 15:41:12 -0400 |
commit | 006d1f0b7f36c25a91006fce24cbe76416fcee86 (patch) | |
tree | bf3e95582edf806677c6aaf56c825ba33c2c2974 /testkiki | |
parent | 495d9fbac3d633b768d910fced5cf00d00118fa0 (diff) |
no cpp needed, since my love is unconditional
Diffstat (limited to 'testkiki')
-rw-r--r-- | testkiki/testkiki.hs | 18 |
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) | ||
7 | import qualified System.Posix.Env | ||
8 | #endif | ||
9 | import System.Environment | 5 | import System.Environment |
10 | --import System.Posix.Env.ByteString (getEnv) | 6 | --import System.Posix.Env.ByteString (getEnv) |
11 | import System.Posix.Files | 7 | import System.Posix.Files |
@@ -24,30 +20,16 @@ import qualified Data.ByteString.Char8 as B | |||
24 | import Data.Time.Clock | 20 | import Data.Time.Clock |
25 | import Data.Time.Clock.POSIX | 21 | import Data.Time.Clock.POSIX |
26 | import Data.IORef | 22 | import Data.IORef |
27 | #if !defined(VERSION_cryptonite) | ||
28 | import Crypto.Hash.SHA1 (hash) | ||
29 | #else | ||
30 | import qualified Crypto.Hash | 23 | import qualified Crypto.Hash |
31 | import Crypto.Hash.Algorithms | 24 | import Crypto.Hash.Algorithms |
32 | import Data.ByteArray (convert) | 25 | import Data.ByteArray (convert) |
33 | #endif | ||
34 | import System.IO.Unsafe (unsafePerformIO) | 26 | import System.IO.Unsafe (unsafePerformIO) |
35 | import ProcessUtils | 27 | import ProcessUtils |
36 | import Data.Bool | 28 | import Data.Bool |
37 | import Data.Char | 29 | import Data.Char |
38 | import KeyRing hiding (try) | 30 | import KeyRing hiding (try) |
39 | 31 | ||
40 | #if defined(VERSION_cryptonite) | ||
41 | hash x = convert (Crypto.Hash.hash x :: Crypto.Hash.Digest SHA1) :: B.ByteString | 32 | hash x = convert (Crypto.Hash.hash x :: Crypto.Hash.Digest SHA1) :: B.ByteString |
42 | #endif | ||
43 | |||
44 | #if !MIN_VERSION_base(4,7,0) | ||
45 | setEnv k v = System.Posix.Env.setEnv k v True | ||
46 | unsetEnv = System.Posix.Env.unsetEnv | ||
47 | bool :: a -> a -> Bool -> a | ||
48 | bool f _ False = f | ||
49 | bool _ t True = t | ||
50 | #endif | ||
51 | 33 | ||
52 | data TestKikiSettings = TKS | 34 | data TestKikiSettings = TKS |
53 | { gnupghome :: FilePath | 35 | { gnupghome :: FilePath |