Skip to content

Commit d288dc7

Browse files
committed
It is perfectly fine to import class methods...
...without specifying the class, see Haskell 2010 5.2.1. That allows us to get rid of some conditional includes. Nevetheless, we still conditionally include foldr', as we do not use it for base <4.8.
1 parent 6b026a7 commit d288dc7

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

Data/Sequence.hs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -158,14 +158,9 @@ 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'), toList)
166-
#else
167161
import Data.Foldable (Foldable(foldl, foldl1, foldr, foldr1, foldMap), foldl', toList)
168-
#endif
162+
#if MIN_VERSION_base(4,8,0)
163+
import Data.Foldable (foldr')
169164
#endif
170165
import Data.Traversable
171166
import Data.Typeable

0 commit comments

Comments
 (0)