From 9a7c8195e5330c868b0e2b9b25af915d5fd2bd7a Mon Sep 17 00:00:00 2001 From: Andrew Cady Date: Sat, 13 Jul 2019 15:55:17 -0400 Subject: require base >= 4.8 --- IntMapClass.hs | 4 ---- cokiki.hs | 5 ----- kiki.cabal | 11 +++++------ lib/CommandLine.hs | 10 ---------- 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 ) import Data.Monoid ( Monoid ) import Control.DeepSeq ( NFData ) import Control.Applicative ( Applicative ) -#if MIN_VERSION_base(4,7,0) import Data.Coerce -#else -class Coercible a b where coerce :: a -> b -#endif newtype IMap k a = IMap { intmap :: IntMap a } 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 = isSpaceTok b = isSpace $ L8.head b -#if !MIN_VERSION_base(4,7,0) -bool :: a -> a -> Bool -> a -bool f _ False = f -bool _ t True = t -#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 Executable kiki Ghc-Options: -W -Wall -Wno-name-shadowing -Wno-unused-matches -Wno-unused-do-bind -Wno-type-defaults Main-is: kiki.hs - -- base >=4.6 due to use of readEither in KikiD.Message - Build-Depends: base >=4.6.0.0, + Build-Depends: base >= 4.8.0.0, asn1-encoding, asn1-types, binary, @@ -36,14 +35,14 @@ Executable kiki Executable hosts Main-is: hosts.hs - Build-Depends: base >=4.6.0.0, + Build-Depends: base >= 4.8.0.0, bytestring, network, kiki Executable cokiki Main-is: cokiki.hs - Build-Depends: base >=4.6.0.0, + Build-Depends: base >= 4.8.0.0, bytestring, filepath, unix, @@ -82,7 +81,7 @@ library Transforms, Data.OpenPGP.Util, Text.XXD - Build-Depends: base >=4.6.0.0, + Build-Depends: base >= 4.8.0.0, openpgp-asciiarmor, asn1-encoding, asn1-types, @@ -117,4 +116,4 @@ Test-suite testkiki , bytestring , time , kiki - Build-Depends: cryptonite, memory, base >= 4.7.0 + 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 @@ {-# LANGUAGE DeriveFunctor #-} -{-# LANGUAGE CPP #-} --- {-# LANGUAGE RankNTypes #-} {-# LANGUAGE BangPatterns #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE StandaloneDeriving #-} @@ -445,14 +443,6 @@ tryCompute os us c@(Computation { compLabel = lbl }) num -> num -} -#if defined(VERSION_base) -#if !MIN_VERSION_base(4,8,0) -sortOn :: Ord b => (a -> b) -> [a] -> [a] -sortOn f = - map snd . sortBy (comparing fst) . map (\x -> let y = f x in y `seq` (y, x)) -#endif -#endif - removeIntersection :: Ord a => [a] -> [a] -> ([a], [a]) removeIntersection (x:xs) (y:ys) | x == y = removeIntersection xs ys -- cgit v1.2.3