[commit: packages/containers] master: Rename local binding to avoid clash with `(<>)` (f9e530a)

git at git.haskell.org git at git.haskell.org
Fri Dec 18 22:12:55 UTC 2015


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

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

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

commit f9e530ab014bbb78411d7f7660dcd4e78502dea4
Author: Herbert Valerio Riedel <hvr at gnu.org>
Date:   Sat Nov 28 22:14:16 2015 +0100

    Rename local binding to avoid clash with `(<>)`


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

f9e530ab014bbb78411d7f7660dcd4e78502dea4
 Data/Sequence.hs | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/Data/Sequence.hs b/Data/Sequence.hs
index 447688d..c3a1e1d 100644
--- a/Data/Sequence.hs
+++ b/Data/Sequence.hs
@@ -2459,28 +2459,28 @@ unrollPQ cmp = unrollPQ'
   where
     {-# INLINE unrollPQ' #-}
     unrollPQ' (PQueue x ts) = x:mergePQs0 ts
-    (<>) = mergePQ cmp
+    (<+>) = mergePQ cmp
     mergePQs0 Nil = []
     mergePQs0 (t :& Nil) = unrollPQ' t
-    mergePQs0 (t1 :& t2 :& ts) = mergePQs (t1 <> t2) ts
+    mergePQs0 (t1 :& t2 :& ts) = mergePQs (t1 <+> t2) ts
     mergePQs t ts = t `seq` case ts of
         Nil             -> unrollPQ' t
-        t1 :& Nil       -> unrollPQ' (t <> t1)
-        t1 :& t2 :& ts' -> mergePQs (t <> (t1 <> t2)) ts'
+        t1 :& Nil       -> unrollPQ' (t <+> t1)
+        t1 :& t2 :& ts' -> mergePQs (t <+> (t1 <+> t2)) ts'
 
 -- | 'toPQ', given an ordering function and a mechanism for queueifying
 -- elements, converts a 'FingerTree' to a 'PQueue'.
 toPQ :: (e -> e -> Ordering) -> (a -> PQueue e) -> FingerTree a -> Maybe (PQueue e)
 toPQ _ _ Empty = Nothing
 toPQ _ f (Single x) = Just (f x)
-toPQ cmp f (Deep _ pr m sf) = Just (maybe (pr' <> sf') ((pr' <> sf') <>) (toPQ cmp fNode m))
+toPQ cmp f (Deep _ pr m sf) = Just (maybe (pr' <+> sf') ((pr' <+> sf') <+>) (toPQ cmp fNode m))
   where
     fDigit digit = case fmap f digit of
         One a           -> a
-        Two a b         -> a <> b
-        Three a b c     -> a <> b <> c
-        Four a b c d    -> (a <> b) <> (c <> d)
-    (<>) = mergePQ cmp
+        Two a b         -> a <+> b
+        Three a b c     -> a <+> b <+> c
+        Four a b c d    -> (a <+> b) <+> (c <+> d)
+    (<+>) = mergePQ cmp
     fNode = fDigit . nodeToDigit
     pr' = fDigit pr
     sf' = fDigit sf



More information about the ghc-commits mailing list