Skip to content

Commit d679fa4

Browse files
committed
Use type application in order to simplify rewrite rules
1 parent 3ca3909 commit d679fa4

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

vector/src/Data/Vector/Generic.hs

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
{-# LANGUAGE RankNTypes #-}
66
{-# LANGUAGE ScopedTypeVariables #-}
77
{-# LANGUAGE TypeFamilies #-}
8+
{-# LANGUAGE TypeApplications #-}
89
-- |
910
-- Module : Data.Vector.Generic
1011
-- Copyright : (c) Roman Leshchinskiy 2008-2010
@@ -2616,19 +2617,11 @@ unstreamPrimM :: (PrimMonad m, Vector v a) => MBundle m u a -> m (v a)
26162617
{-# INLINE_FUSED unstreamPrimM #-}
26172618
unstreamPrimM s = M.munstream s >>= unsafeFreeze
26182619

2619-
-- FIXME: the next two functions are only necessary for the specialisations
2620-
unstreamPrimM_IO :: Vector v a => MBundle IO u a -> IO (v a)
2621-
{-# INLINE unstreamPrimM_IO #-}
2622-
unstreamPrimM_IO = unstreamPrimM
2623-
2624-
unstreamPrimM_ST :: Vector v a => MBundle (ST s) u a -> ST s (v a)
2625-
{-# INLINE unstreamPrimM_ST #-}
2626-
unstreamPrimM_ST = unstreamPrimM
2627-
26282620
{-# RULES
26292621

2630-
"unstreamM[IO]" unstreamM = unstreamPrimM_IO
2631-
"unstreamM[ST]" unstreamM = unstreamPrimM_ST #-}
2622+
"unstreamM[IO]" unstreamM @IO = unstreamPrimM
2623+
"unstreamM[ST]" forall s. forall. unstreamM @(ST s) = unstreamPrimM
2624+
#-}
26322625

26332626

26342627

0 commit comments

Comments
 (0)