summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cady <d@jerkface.net>2019-07-13 15:55:17 -0400
committerAndrew Cady <d@jerkface.net>2019-07-13 15:55:17 -0400
commit9a7c8195e5330c868b0e2b9b25af915d5fd2bd7a (patch)
treefb05b8d395777e8ebfd7e2c462c4ba4b5e0ef170
parentde7f249e4d359d741b4520a749818d305fa402bd (diff)
require base >= 4.8
-rw-r--r--IntMapClass.hs4
-rw-r--r--cokiki.hs5
-rw-r--r--kiki.cabal11
-rw-r--r--lib/CommandLine.hs10
4 files changed, 5 insertions, 25 deletions
diff --git a/IntMapClass.hs b/IntMapClass.hs
index 77ce16b..81382aa 100644
--- a/IntMapClass.hs
+++ b/IntMapClass.hs
@@ -15,11 +15,7 @@ import Data.Traversable ( Traversable )
15import Data.Monoid ( Monoid ) 15import Data.Monoid ( Monoid )
16import Control.DeepSeq ( NFData ) 16import Control.DeepSeq ( NFData )
17import Control.Applicative ( Applicative ) 17import Control.Applicative ( Applicative )
18#if MIN_VERSION_base(4,7,0)
19import Data.Coerce 18import Data.Coerce
20#else
21class Coercible a b where coerce :: a -> b
22#endif
23 19
24newtype IMap k a = IMap { intmap :: IntMap a } 20newtype IMap k a = IMap { intmap :: IntMap a }
25 deriving 21 deriving
diff --git a/cokiki.hs b/cokiki.hs
index d145045..4a8039c 100644
--- a/cokiki.hs
+++ b/cokiki.hs
@@ -248,8 +248,3 @@ sshIsDirective d ls =
248 isSpaceTok b = isSpace $ L8.head b 248 isSpaceTok b = isSpace $ L8.head b
249 249
250 250
251#if !MIN_VERSION_base(4,7,0)
252bool :: a -> a -> Bool -> a
253bool f _ False = f
254bool _ t True = t
255#endif
diff --git a/kiki.cabal b/kiki.cabal
index 630ff8b..1eca45b 100644
--- a/kiki.cabal
+++ b/kiki.cabal
@@ -14,8 +14,7 @@ build-type: Simple
14Executable kiki 14Executable kiki
15 Ghc-Options: -W -Wall -Wno-name-shadowing -Wno-unused-matches -Wno-unused-do-bind -Wno-type-defaults 15 Ghc-Options: -W -Wall -Wno-name-shadowing -Wno-unused-matches -Wno-unused-do-bind -Wno-type-defaults
16 Main-is: kiki.hs 16 Main-is: kiki.hs
17 -- base >=4.6 due to use of readEither in KikiD.Message 17 Build-Depends: base >= 4.8.0.0,
18 Build-Depends: base >=4.6.0.0,
19 asn1-encoding, 18 asn1-encoding,
20 asn1-types, 19 asn1-types,
21 binary, 20 binary,
@@ -36,14 +35,14 @@ Executable kiki
36 35
37Executable hosts 36Executable hosts
38 Main-is: hosts.hs 37 Main-is: hosts.hs
39 Build-Depends: base >=4.6.0.0, 38 Build-Depends: base >= 4.8.0.0,
40 bytestring, 39 bytestring,
41 network, 40 network,
42 kiki 41 kiki
43 42
44Executable cokiki 43Executable cokiki
45 Main-is: cokiki.hs 44 Main-is: cokiki.hs
46 Build-Depends: base >=4.6.0.0, 45 Build-Depends: base >= 4.8.0.0,
47 bytestring, 46 bytestring,
48 filepath, 47 filepath,
49 unix, 48 unix,
@@ -82,7 +81,7 @@ library
82 Transforms, 81 Transforms,
83 Data.OpenPGP.Util, 82 Data.OpenPGP.Util,
84 Text.XXD 83 Text.XXD
85 Build-Depends: base >=4.6.0.0, 84 Build-Depends: base >= 4.8.0.0,
86 openpgp-asciiarmor, 85 openpgp-asciiarmor,
87 asn1-encoding, 86 asn1-encoding,
88 asn1-types, 87 asn1-types,
@@ -117,4 +116,4 @@ Test-suite testkiki
117 , bytestring 116 , bytestring
118 , time 117 , time
119 , kiki 118 , kiki
120 Build-Depends: cryptonite, memory, base >= 4.7.0 119 Build-Depends: cryptonite, memory, base >= 4.8.0.0
diff --git a/lib/CommandLine.hs b/lib/CommandLine.hs
index 2676260..4897b21 100644
--- a/lib/CommandLine.hs
+++ b/lib/CommandLine.hs
@@ -1,6 +1,4 @@
1{-# LANGUAGE DeriveFunctor #-} 1{-# LANGUAGE DeriveFunctor #-}
2{-# LANGUAGE CPP #-}
3-- {-# LANGUAGE RankNTypes #-}
4{-# LANGUAGE BangPatterns #-} 2{-# LANGUAGE BangPatterns #-}
5{-# LANGUAGE GADTs #-} 3{-# LANGUAGE GADTs #-}
6{-# LANGUAGE StandaloneDeriving #-} 4{-# LANGUAGE StandaloneDeriving #-}
@@ -445,14 +443,6 @@ tryCompute os us c@(Computation { compLabel = lbl })
445 num -> num 443 num -> num
446-} 444-}
447 445
448#if defined(VERSION_base)
449#if !MIN_VERSION_base(4,8,0)
450sortOn :: Ord b => (a -> b) -> [a] -> [a]
451sortOn f =
452 map snd . sortBy (comparing fst) . map (\x -> let y = f x in y `seq` (y, x))
453#endif
454#endif
455
456removeIntersection :: Ord a => [a] -> [a] -> ([a], [a]) 446removeIntersection :: Ord a => [a] -> [a] -> ([a], [a])
457removeIntersection (x:xs) (y:ys) 447removeIntersection (x:xs) (y:ys)
458 | x == y = removeIntersection xs ys 448 | x == y = removeIntersection xs ys