Skip to content

Commit f22d14b

Browse files
committed
Merge pull request #86 from treeowl/foldableimports
Make version-appropriate Foldable imports
2 parents cd5a854 + 39e9ee9 commit f22d14b

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
@@ -158,7 +158,15 @@ import Control.DeepSeq (NFData(rnf))
158158
import Control.Monad (MonadPlus(..), ap)
159159
import Data.Monoid (Monoid(..))
160160
import Data.Functor (Functor(..))
161+
#if MIN_VERSION_base(4,8,0)
162+
import Data.Foldable (Foldable(foldl, foldl1, foldr, foldr1, foldMap, foldl', foldr', toList))
163+
#else
164+
#if MIN_VERSION_base(4,6,0)
165+
import Data.Foldable (Foldable(foldl, foldl1, foldr, foldr1, foldMap, foldl', foldr'), toList)
166+
#else
161167
import Data.Foldable (Foldable(foldl, foldl1, foldr, foldr1, foldMap), foldl', foldr', toList)
168+
#endif
169+
#endif
162170
import Data.Traversable
163171
import Data.Typeable
164172

0 commit comments

Comments
 (0)