File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -186,6 +186,7 @@ import Data.Data
186
186
187
187
-- Array stuff, with GHC.Arr on GHC
188
188
import Data.Array (Ix , Array )
189
+ import qualified Data.Array
189
190
#ifdef __GLASGOW_HASKELL__
190
191
import qualified GHC.Arr
191
192
#endif
@@ -1649,6 +1650,10 @@ fromFunction len f | len < 0 = error "Data.Sequence.fromFunction called with neg
1649
1650
fromArray :: Ix i => Array i a -> Seq a
1650
1651
#ifdef __GLASGOW_HASKELL__
1651
1652
fromArray a = fromFunction (GHC.Arr. numElements a) (GHC.Arr. unsafeAt a)
1653
+ where
1654
+ -- The following definition uses (Ix i) constraing, which is needed for the
1655
+ -- other fromArray definition.
1656
+ _ = Data.Array. rangeSize (Data.Array. bounds a)
1652
1657
#else
1653
1658
fromArray a = fromList2 (Data.Array. rangeSize (Data.Array. bounds a)) (Data.Array. elems a)
1654
1659
#endif
You can’t perform that action at this time.
0 commit comments