Skip to content

Commit 725e18e

Browse files
phadejtreeowl
authored andcommitted
Prepare containers to specialization of Data.List
1 parent 82c1738 commit 725e18e

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

containers/src/Data/Graph.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ import Data.Array.Unboxed ( UArray )
122122
#else
123123
import qualified Data.Array as UA
124124
#endif
125-
import Data.List
125+
import qualified Data.List as L
126126
#if MIN_VERSION_base(4,9,0)
127127
import Data.Functor.Classes
128128
#endif
@@ -442,7 +442,7 @@ graphFromEdges edges0
442442
where
443443
max_v = length edges0 - 1
444444
bounds0 = (0,max_v) :: (Vertex, Vertex)
445-
sorted_edges = sortBy lt edges0
445+
sorted_edges = L.sortBy lt edges0
446446
edges1 = zipWith (,) [0..] sorted_edges
447447

448448
graph = array bounds0 [(,) v (mapMaybe key_vertex ks) | (,) v (_, _, ks) <- edges1]

containers/src/Data/Sequence/Internal.hs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,6 @@ import Prelude hiding (
202202
null, length, lookup, take, drop, splitAt, foldl, foldl1, foldr, foldr1,
203203
scanl, scanl1, scanr, scanr1, replicate, zip, zipWith, zip3, zipWith3,
204204
unzip, takeWhile, dropWhile, iterate, reverse, filter, mapM, sum, all)
205-
import qualified Data.List
206205
import Control.Applicative (Applicative(..), (<$>), (<**>), Alternative,
207206
liftA2, liftA3)
208207
import qualified Control.Applicative as Applicative
@@ -212,6 +211,11 @@ import Data.Monoid (Monoid(..))
212211
import Data.Functor (Functor(..))
213212
import Utils.Containers.Internal.State (State(..), execState)
214213
import Data.Foldable (Foldable(foldl, foldl1, foldr, foldr1, foldMap, foldl', foldr'), toList)
214+
import qualified Data.Foldable as F
215+
216+
#if !(__GLASGOW_HASKELL__ >= 708)
217+
import qualified Data.List
218+
#endif
215219

216220
#if MIN_VERSION_base(4,9,0)
217221
import qualified Data.Semigroup as Semigroup

0 commit comments

Comments
 (0)