Skip to content

Commit 361c1e3

Browse files
committed
Fix Traversable use for createT on older GHCs.
1 parent 0cf1ae4 commit 361c1e3

File tree

5 files changed

+8
-1
lines changed

5 files changed

+8
-1
lines changed

Data/Vector.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -703,7 +703,7 @@ create :: (forall s. ST s (MVector s a)) -> Vector a
703703
create p = G.create p
704704

705705
-- | Execute the monadic action and freeze the resulting vectors.
706-
createT :: Traversable f => (forall s. ST s (f (MVector s a))) -> f (Vector a)
706+
createT :: Traversable.Traversable f => (forall s. ST s (f (MVector s a))) -> f (Vector a)
707707
{-# INLINE createT #-}
708708
createT p = G.createT p
709709

Data/Vector/Generic.hs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,10 @@ mkNoRepType :: String -> DataType
217217
mkNoRepType = mkNorepType
218218
#endif
219219

220+
#if !MIN_VERSION_base(4,8,0)
221+
import Data.Traversable (Traversable, traverse)
222+
#endif
223+
220224
-- Length information
221225
-- ------------------
222226

Data/Vector/Primitive.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ import Data.Semigroup ( Semigroup(..) )
169169

170170
#if !MIN_VERSION_base(4,8,0)
171171
import Data.Monoid ( Monoid(..) )
172+
import Data.Traversable ( Traversable )
172173
#endif
173174

174175
#if __GLASGOW_HASKELL__ >= 708

Data/Vector/Storable.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ import Data.Semigroup ( Semigroup(..) )
174174

175175
#if !MIN_VERSION_base(4,8,0)
176176
import Data.Monoid ( Monoid(..) )
177+
import Data.Traversable ( Traversable )
177178
#endif
178179

179180
#if __GLASGOW_HASKELL__ >= 708

Data/Vector/Unboxed.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ import Data.Semigroup ( Semigroup(..) )
191191

192192
#if !MIN_VERSION_base(4,8,0)
193193
import Data.Monoid ( Monoid(..) )
194+
import Data.Traversable ( Traversable )
194195
#endif
195196

196197
#if __GLASGOW_HASKELL__ >= 708

0 commit comments

Comments
 (0)