[commit: packages/containers] master: Drop seemingly ineffective SPECIALISE pragmas (2e3802f)

git at git.haskell.org git at git.haskell.org
Sun Dec 20 16:25:18 UTC 2015


Repository : ssh://git@git.haskell.org/containers

On branch  : master
Link       : http://git.haskell.org/packages/containers.git/commitdiff/2e3802f1aa8eb8c5769b6f00697048485cb9abb2

>---------------------------------------------------------------

commit 2e3802f1aa8eb8c5769b6f00697048485cb9abb2
Author: Herbert Valerio Riedel <hvr at gnu.org>
Date:   Wed Nov 25 08:49:03 2015 +0100

    Drop seemingly ineffective SPECIALISE pragmas
    
    GHC HEAD warns about these:
    
    ```
    Data/Sequence.hs:407:1: warning:
        SPECIALISE pragma for non-overloaded function ‘aptyMiddle’
    
    Data/Sequence.hs:416:1: warning:
        SPECIALISE pragma for non-overloaded function ‘aptyMiddle’
    
    Data/Sequence.hs:1001:1: warning:
        SPECIALISE pragma for non-overloaded function ‘cycleNMiddle’
    
    Data/Sequence.hs:1007:1: warning:
        SPECIALISE pragma for non-overloaded function ‘cycleNMiddle’
    ```


>---------------------------------------------------------------

2e3802f1aa8eb8c5769b6f00697048485cb9abb2
 Data/Sequence.hs | 32 --------------------------------
 1 file changed, 32 deletions(-)

diff --git a/Data/Sequence.hs b/Data/Sequence.hs
index 6b42841..089b292 100644
--- a/Data/Sequence.hs
+++ b/Data/Sequence.hs
@@ -404,25 +404,6 @@ aptyMiddle firstf
             (Two (fmap lastf pr) (fmap lastf q))
    where converted = node3 pr q sf
 
-{-# SPECIALIZE
- aptyMiddle
-  :: (Node c -> d)
-     -> (Node c -> d)
-     -> ((a -> b) -> Node c -> d)
-     -> FingerTree (Elem (a -> b))
-     -> Rigid (Node c)
-     -> FingerTree (Node d)
- #-}
-{-# SPECIALIZE
- aptyMiddle
-  :: (Elem c -> d)
-     -> (Elem c -> d)
-     -> ((a -> b) -> Elem c -> d)
-     -> FingerTree (Elem (a -> b))
-     -> Rigid (Elem c)
-     -> FingerTree (Node d)
- #-}
-
 digit12ToDigit :: Digit12 a -> Digit a
 digit12ToDigit (One12 a) = One a
 digit12ToDigit (Two12 a b) = Two a b
@@ -998,19 +979,6 @@ cycleNMiddle n
             (Two pr q)
    where converted = node3 pr q sf
 
-{-# SPECIALIZE
- cycleNMiddle
-  :: Int
-     -> Rigid (Node c)
-     -> FingerTree (Node (Node c))
- #-}
-{-# SPECIALIZE
- cycleNMiddle
-  :: Int
-     -> Rigid (Elem c)
-     -> FingerTree (Node (Elem c))
- #-}
-
 
 -- | /O(1)/. Add an element to the left end of a sequence.
 -- Mnemonic: a triangle with the single element at the pointy end.



More information about the ghc-commits mailing list