File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -1759,7 +1759,7 @@ findIndicesR p xs = foldlWithIndex g [] xs
1759
1759
-- There is a function 'toList' in the opposite direction for all
1760
1760
-- instances of the 'Foldable' class, including 'Seq'.
1761
1761
fromList :: [a ] -> Seq a
1762
- fromList xs = Seq $ mkTree 1 $ Data.List. map Elem xs
1762
+ fromList xs = Seq $ mkTree 1 $ map_elem xs
1763
1763
where
1764
1764
{-# SPECIALIZE mkTree :: Int -> [Elem a] -> FingerTree (Elem a) #-}
1765
1765
{-# SPECIALIZE mkTree :: Int -> [Node a] -> FingerTree (Node a) #-}
@@ -1781,6 +1781,14 @@ fromList xs = Seq $ mkTree 1 $ Data.List.map Elem xs
1781
1781
getNodes s (x1: x2: x3: xs) = s `seq` (Node3 s x1 x2 x3: ns, d)
1782
1782
where (ns, d) = getNodes s xs
1783
1783
1784
+ map_elem :: [a ] -> [Elem a ]
1785
+ #if __GLASGOW_HASKELL__ >= 708
1786
+ map_elem xs = coerce xs
1787
+ #else
1788
+ map_elem xs = Data.List. map Elem xs
1789
+ #endif
1790
+ {-# INLINE map_elem #-}
1791
+
1784
1792
#if __GLASGOW_HASKELL__ >= 708
1785
1793
instance GHC.Exts. IsList (Seq a ) where
1786
1794
type Item (Seq a ) = a
You can’t perform that action at this time.
0 commit comments