Skip to content

Commit

Permalink
Drop support for pre-7.6 GHC
Browse files Browse the repository at this point in the history
* Bump base dependency
* Bump `array` dependency
* Assume at least 7.6 when compiling with GHC
* Drop support for compiling without MIN_VERSION macros. These
  are now built into GHC. We can add some sort of support back
  if we expand to a non-GHC compiler, but that support will look
  completely different anyway.
* Remove deprecated `Data.Map.Lazy.Merge` and `Data.Map.Strict.Merge`
  modules. These were renamed almost immediately after they were
  introduced.
* Update changelog
  • Loading branch information
treeowl committed Mar 9, 2018
1 parent b1a1e2f commit 4952822
Show file tree
Hide file tree
Showing 33 changed files with 98 additions and 291 deletions.
4 changes: 0 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@

# See also https://github.com/hvr/multi-ghc-travis for more information
env:
- GHCVER=7.0.4 CABALVER=1.16
# we have to use CABALVER=1.16 for GHC<7.6 as well, as there's
# no package for earlier cabal versions in the PPA
- GHCVER=7.4.2 CABALVER=1.16
- GHCVER=7.6.3 CABALVER=1.16
- GHCVER=7.8.4 CABALVER=1.18
- GHCVER=7.10.3 CABALVER=1.22
Expand Down
2 changes: 1 addition & 1 deletion Data/Containers/ListUtils.hs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE BangPatterns #-}
#if __GLASGOW_HASKELL__ >= 703
#ifdef __GLASGOW_HASKELL__
{-# LANGUAGE Trustworthy #-}
#endif

Expand Down
21 changes: 4 additions & 17 deletions Data/Graph.hs
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
{-# LANGUAGE CPP #-}
#if __GLASGOW_HASKELL__
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE StandaloneDeriving #-}
#endif
#if __GLASGOW_HASKELL__ >= 703
{-# LANGUAGE Trustworthy #-}
#endif
#if __GLASGOW_HASKELL__ >= 702
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE Trustworthy #-}
#endif

#include "containers.h"
Expand Down Expand Up @@ -120,15 +115,11 @@ import Data.List
import Data.Functor.Classes
import Data.Semigroup (Semigroup (..))
#endif
#if __GLASGOW_HASKELL__ >= 706
import GHC.Generics (Generic, Generic1)
#elif __GLASGOW_HASKELL__ >= 702
import GHC.Generics (Generic)
#endif
#ifdef __GLASGOW_HASKELL__
import GHC.Generics (Generic, Generic1)
import Data.Data (Data)
#endif
import Data.Typeable
#endif


-------------------------------------------------------------------------
Expand Down Expand Up @@ -156,14 +147,10 @@ INSTANCE_TYPEABLE1(SCC)
#ifdef __GLASGOW_HASKELL__
-- | @since 0.5.9
deriving instance Data vertex => Data (SCC vertex)
#endif

#if __GLASGOW_HASKELL__ >= 706
-- | @since 0.5.9
deriving instance Generic1 SCC
#endif

#if __GLASGOW_HASKELL__ >= 702
-- | @since 0.5.9
deriving instance Generic (SCC vertex)
#endif
Expand Down
2 changes: 1 addition & 1 deletion Data/IntMap.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{-# LANGUAGE CPP #-}
#if !defined(TESTING) && __GLASGOW_HASKELL__ >= 703
#if !defined(TESTING) && defined(__GLASGOW_HASKELL__)
{-# LANGUAGE Safe #-}
#endif

Expand Down
5 changes: 1 addition & 4 deletions Data/IntMap/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{-# LANGUAGE MagicHash, DeriveDataTypeable, StandaloneDeriving #-}
{-# LANGUAGE ScopedTypeVariables #-}
#endif
#if !defined(TESTING) && __GLASGOW_HASKELL__ >= 703
#if !defined(TESTING) && defined(__GLASGOW_HASKELL__)
{-# LANGUAGE Trustworthy #-}
#endif
#if __GLASGOW_HASKELL__ >= 708
Expand Down Expand Up @@ -444,13 +444,10 @@ instance Foldable.Foldable IntMap where
go (Tip _ v) = f v
go (Bin _ _ l r) = go l `mappend` go r
{-# INLINE foldMap #-}

#if MIN_VERSION_base(4,6,0)
foldl' = foldl'
{-# INLINE foldl' #-}
foldr' = foldr'
{-# INLINE foldr' #-}
#endif
#if MIN_VERSION_base(4,8,0)
length = size
{-# INLINE length #-}
Expand Down
2 changes: 1 addition & 1 deletion Data/IntMap/Lazy.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{-# LANGUAGE CPP #-}
#if !defined(TESTING) && __GLASGOW_HASKELL__ >= 703
#if !defined(TESTING) && defined(__GLASGOW_HASKELL__)
{-# LANGUAGE Safe #-}
#endif

Expand Down
2 changes: 1 addition & 1 deletion Data/IntMap/Merge/Lazy.hs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#if __GLASGOW_HASKELL__
{-# LANGUAGE DeriveDataTypeable, StandaloneDeriving #-}
#endif
#if !defined(TESTING) && __GLASGOW_HASKELL__ >= 703
#if !defined(TESTING) && defined(__GLASGOW_HASKELL__)
{-# LANGUAGE Safe #-}
#endif
#if __GLASGOW_HASKELL__ >= 708
Expand Down
2 changes: 1 addition & 1 deletion Data/IntMap/Merge/Strict.hs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#if __GLASGOW_HASKELL__
{-# LANGUAGE DeriveDataTypeable, StandaloneDeriving #-}
#endif
#if !defined(TESTING) && __GLASGOW_HASKELL__ >= 703
#if !defined(TESTING) && defined(__GLASGOW_HASKELL__)
{-# LANGUAGE Safe #-}
#endif
#if __GLASGOW_HASKELL__ >= 708
Expand Down
2 changes: 1 addition & 1 deletion Data/IntMap/Strict.hs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE BangPatterns #-}
#if !defined(TESTING) && __GLASGOW_HASKELL__ >= 703
#if !defined(TESTING) && defined(__GLASGOW_HASKELL__)
{-# LANGUAGE Trustworthy #-}
#endif

Expand Down
2 changes: 1 addition & 1 deletion Data/IntSet.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{-# LANGUAGE CPP #-}
#if !defined(TESTING) && __GLASGOW_HASKELL__ >= 703
#if !defined(TESTING) && defined(__GLASGOW_HASKELL__)
{-# LANGUAGE Safe #-}
#endif

Expand Down
2 changes: 1 addition & 1 deletion Data/IntSet/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#if __GLASGOW_HASKELL__
{-# LANGUAGE MagicHash, DeriveDataTypeable, StandaloneDeriving #-}
#endif
#if !defined(TESTING) && __GLASGOW_HASKELL__ >= 703
#if !defined(TESTING) && defined(__GLASGOW_HASKELL__)
{-# LANGUAGE Trustworthy #-}
#endif
#if __GLASGOW_HASKELL__ >= 708
Expand Down
2 changes: 1 addition & 1 deletion Data/Map.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{-# LANGUAGE CPP #-}
#if !defined(TESTING) && __GLASGOW_HASKELL__ >= 703
#if !defined(TESTING) && defined(__GLASGOW_HASKELL__)
{-# LANGUAGE Safe #-}
#endif

Expand Down
5 changes: 1 addition & 4 deletions Data/Map/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#if __GLASGOW_HASKELL__
{-# LANGUAGE DeriveDataTypeable, StandaloneDeriving #-}
#endif
#if __GLASGOW_HASKELL__ >= 703
#if defined(__GLASGOW_HASKELL__)
{-# LANGUAGE Trustworthy #-}
#endif
#if __GLASGOW_HASKELL__ >= 708
Expand Down Expand Up @@ -4142,13 +4142,10 @@ instance Foldable.Foldable (Map k) where
go (Bin 1 _ v _ _) = f v
go (Bin _ _ v l r) = go l `mappend` (f v `mappend` go r)
{-# INLINE foldMap #-}

#if MIN_VERSION_base(4,6,0)
foldl' = foldl'
{-# INLINE foldl' #-}
foldr' = foldr'
{-# INLINE foldr' #-}
#endif
#if MIN_VERSION_base(4,8,0)
length = size
{-# INLINE length #-}
Expand Down
2 changes: 1 addition & 1 deletion Data/Map/Lazy.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{-# LANGUAGE CPP #-}
#if __GLASGOW_HASKELL__ >= 703
#if defined(__GLASGOW_HASKELL__)
{-# LANGUAGE Safe #-}
#endif

Expand Down
39 changes: 0 additions & 39 deletions Data/Map/Lazy/Merge.hs

This file was deleted.

2 changes: 1 addition & 1 deletion Data/Map/Merge/Lazy.hs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#if __GLASGOW_HASKELL__
{-# LANGUAGE DeriveDataTypeable, StandaloneDeriving #-}
#endif
#if !defined(TESTING) && __GLASGOW_HASKELL__ >= 703
#if !defined(TESTING) && defined(__GLASGOW_HASKELL__)
{-# LANGUAGE Safe #-}
#endif
#if __GLASGOW_HASKELL__ >= 708
Expand Down
2 changes: 1 addition & 1 deletion Data/Map/Merge/Strict.hs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#if __GLASGOW_HASKELL__
{-# LANGUAGE DeriveDataTypeable, StandaloneDeriving #-}
#endif
#if !defined(TESTING) && __GLASGOW_HASKELL__ >= 703
#if !defined(TESTING) && defined(__GLASGOW_HASKELL__)
{-# LANGUAGE Safe #-}
#endif
#if __GLASGOW_HASKELL__ >= 708
Expand Down
2 changes: 1 addition & 1 deletion Data/Map/Strict.hs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE BangPatterns #-}
#if __GLASGOW_HASKELL__ >= 703
#if defined(__GLASGOW_HASKELL__)
{-# LANGUAGE Safe #-}
#endif

Expand Down
2 changes: 1 addition & 1 deletion Data/Map/Strict/Internal.hs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE BangPatterns #-}
#if __GLASGOW_HASKELL__ >= 703
#if defined(__GLASGOW_HASKELL__)
{-# LANGUAGE Trustworthy #-}
#endif
{-# OPTIONS_HADDOCK not-home #-}
Expand Down
39 changes: 0 additions & 39 deletions Data/Map/Strict/Merge.hs

This file was deleted.

Loading

0 comments on commit 4952822

Please sign in to comment.