Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Remove implicit param constraints from the functional arguments

  • Loading branch information...
commit 465c0513070b8f6785421a4511c45420e7f1c194 1 parent c02b867
Roman Cheplyaka authored March 13, 2013

Showing 1 changed file with 6 additions and 6 deletions. Show diff stats Hide diff stats

  1. 12  Data/Generics/Traversable.hs
12  Data/Generics/Traversable.hs
@@ -65,7 +65,7 @@ class GTraversable (c :: * -> Constraint) a where
65 65
 -- | Generic map over the immediate subterms
66 66
 gmap
67 67
   :: (GTraversable c a, ?c :: p c)
68  
-  => (forall d . (GTraversable c d, c d, ?c :: p c) => d -> d)
  68
+  => (forall d . (GTraversable c d, c d) => d -> d)
69 69
   -> a -> a
70 70
 gmap f = runIdentity . gtraverse (Identity . f)
71 71
 
@@ -87,14 +87,14 @@ gfoldMap f = getConstant . gtraverse (Constant . f)
87 87
 -- | Generic right fold over the immediate subterms
88 88
 gfoldr
89 89
   :: (GTraversable c a, ?c :: p c)
90  
-  => (forall d . (GTraversable c d, c d, ?c :: p c) => d -> r -> r)
  90
+  => (forall d . (GTraversable c d, c d) => d -> r -> r)
91 91
   -> r -> a -> r
92 92
 gfoldr f z t = appEndo (gfoldMap (Endo . f) t) z
93 93
 
94 94
 -- | Generic strict left fold over the immediate subterms
95 95
 gfoldl'
96 96
   :: (GTraversable c a, ?c :: p c)
97  
-  => (forall d . (GTraversable c d, c d, ?c :: p c) => r -> d -> r)
  97
+  => (forall d . (GTraversable c d, c d) => r -> d -> r)
98 98
   -> r -> a -> r
99 99
 gfoldl' f z0 xs = gfoldr f' id xs z0
100 100
   where f' x k z = k $! f z x
@@ -109,14 +109,14 @@ everywhere f = f . gmap (everywhere f)
109 109
 -- | Apply a transformation everywhere in top-down manner
110 110
 everywhere'
111 111
   :: (GTraversable c a, c a, ?c :: p c)
112  
-  => (forall a. (GTraversable c a, c a, ?c :: p c) => a -> a)
  112
+  => (forall a. (GTraversable c a, c a) => a -> a)
113 113
   -> a -> a
114 114
 everywhere' f = gmap (everywhere' f) . f
115 115
 
116 116
 -- | Monadic variation on everywhere
117 117
 everywhereM
118 118
   :: (Monad m, GTraversable c a, c a, ?c :: p c)
119  
-  => (forall a. (GTraversable c a, c a, ?c :: p c) => a -> m a)
  119
+  => (forall a. (GTraversable c a, c a) => a -> m a)
120 120
   -> a -> m a
121 121
 everywhereM f = f <=< gmapM (everywhereM f)
122 122
 
@@ -124,7 +124,7 @@ everywhereM f = f <=< gmapM (everywhereM f)
124 124
 everything
125 125
   :: (GTraversable c a, c a, ?c :: p c)
126 126
   => (r -> r -> r)
127  
-  -> (forall d . (GTraversable c d, c d, ?c :: p c) => d -> r)
  127
+  -> (forall d . (GTraversable c d, c d) => d -> r)
128 128
   -> a -> r
129 129
 everything combine f x =
130 130
   gfoldl' (\a y -> combine a (everything combine f y)) (f x) x

0 notes on commit 465c051

Please sign in to comment.
Something went wrong with that request. Please try again.