Skip to content

Commit 39e9ee9

Browse files
committed
Make version-appropriate Foldable imports
foldl' and foldr' moved into the Foldable class, then toList. This gets rid of a warning about the imports.
1 parent e1e75b8 commit 39e9ee9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Data/Sequence.hs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,15 @@ import Control.DeepSeq (NFData(rnf))
155155
import Control.Monad (MonadPlus(..), ap)
156156
import Data.Monoid (Monoid(..))
157157
import Data.Functor (Functor(..))
158+
#if MIN_VERSION_base(4,8,0)
159+
import Data.Foldable (Foldable(foldl, foldl1, foldr, foldr1, foldMap, foldl', foldr', toList))
160+
#else
161+
#if MIN_VERSION_base(4,6,0)
162+
import Data.Foldable (Foldable(foldl, foldl1, foldr, foldr1, foldMap, foldl', foldr'), toList)
163+
#else
158164
import Data.Foldable (Foldable(foldl, foldl1, foldr, foldr1, foldMap), foldl', foldr', toList)
165+
#endif
166+
#endif
159167
import Data.Traversable
160168
import Data.Typeable
161169

0 commit comments

Comments
 (0)