[commit: packages/containers] master: Remove redundant constraints (e024991)
git at git.haskell.org
git at git.haskell.org
Sun Dec 20 16:25:16 UTC 2015
Repository : ssh://git@git.haskell.org/containers
On branch : master
Link : http://git.haskell.org/packages/containers.git/commitdiff/e02499103d1c4e95f5f57c7e6571f8e3040712ca
>---------------------------------------------------------------
commit e02499103d1c4e95f5f57c7e6571f8e3040712ca
Author: Herbert Valerio Riedel <hvr at gnu.org>
Date: Wed Nov 25 08:45:50 2015 +0100
Remove redundant constraints
GHC HEAD warns about those:
```
Data/Sequence.hs:432:12: warning:
• Redundant constraint: Sized a
• In the type signature for:
squashL :: Sized a =>
Digit23 a -> Digit12 (Node a) -> Digit23 (Node a)
Data/Sequence.hs:437:12: warning:
• Redundant constraint: Sized a
• In the type signature for:
squashR :: Sized a =>
Digit12 (Node a) -> Digit23 a -> Digit23 (Node a)
```
>---------------------------------------------------------------
e02499103d1c4e95f5f57c7e6571f8e3040712ca
Data/Sequence.hs | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/Data/Sequence.hs b/Data/Sequence.hs
index bb86c95..6b42841 100644
--- a/Data/Sequence.hs
+++ b/Data/Sequence.hs
@@ -357,8 +357,7 @@ type Digit23 a = Node a
-- class, but as it is we have to build up 'map23' explicitly through the
-- recursion.
aptyMiddle
- :: Sized c =>
- (c -> d)
+ :: (c -> d)
-> (c -> d)
-> ((a -> b) -> c -> d)
-> FingerTree (Elem (a -> b))
@@ -429,12 +428,12 @@ digit12ToDigit (One12 a) = One a
digit12ToDigit (Two12 a b) = Two a b
-- Squash the first argument down onto the left side of the second.
-squashL :: Sized a => Digit23 a -> Digit12 (Node a) -> Digit23 (Node a)
+squashL :: Digit23 a -> Digit12 (Node a) -> Digit23 (Node a)
squashL m (One12 n) = node2 m n
squashL m (Two12 n1 n2) = node3 m n1 n2
-- Squash the second argument down onto the right side of the first
-squashR :: Sized a => Digit12 (Node a) -> Digit23 a -> Digit23 (Node a)
+squashR :: Digit12 (Node a) -> Digit23 a -> Digit23 (Node a)
squashR (One12 n) m = node2 n m
squashR (Two12 n1 n2) m = node3 n1 n2 m
@@ -965,7 +964,7 @@ cycleN n (Seq xsFT) = case rigidify xsFT of
(nodeToDigit sf)
cycleNMiddle
- :: Sized c => Int
+ :: Int
-> Rigid c
-> FingerTree (Node c)
More information about the ghc-commits
mailing list