These were turned off as a side-effect of a previous nhc-only fix for
#2176 that is no longer needed. They should be fine for nhc now.
import GHC.Arr
#elif defined(__HUGS__)
import Hugs.Array
+#elif defined(__NHC__)
+import Array
#endif
-- | Data structures that can be folded.
foldr1 = Prelude.foldr1
foldl1 = Prelude.foldl1
-#ifndef __NHC__
instance Ix i => Foldable (Array i) where
- foldr f z = Prelude.foldr f z . elems
-#endif
+ foldr f z = Prelude.foldr f z . elems
-- | Fold over the elements of a structure,
-- associating to the right, but strictly.
import GHC.Arr
#elif defined(__HUGS__)
import Hugs.Array
+#elif defined(__NHC__)
+import Array
#endif
-- | Functors representing data structures that can be traversed from
mapM = Prelude.mapM
-#ifndef __NHC__
instance Ix i => Traversable (Array i) where
- traverse f arr = listArray (bounds arr) `fmap` traverse f (elems arr)
-#endif
+ traverse f arr = listArray (bounds arr) `fmap` traverse f (elems arr)
-- general functions