Permalink
Browse files

Remove superfluous constraints in the hand-written instances

  • Loading branch information...
1 parent c916355 commit c9a92f01d7a2dc5b3891b077de73614b41c81a42 @feuerbach committed Mar 16, 2013
Showing with 10 additions and 10 deletions.
  1. +10 −10 Data/Generics/Traversable/Instances.hs
View
20 Data/Generics/Traversable/Instances.hs
@@ -8,23 +8,23 @@ import Data.Generics.Traversable.TH
import Control.Applicative
import Data.Ratio
-instance c () => GTraversable c ()
-instance c Bool => GTraversable c Bool
-instance c Int => GTraversable c Int
-instance c Integer => GTraversable c Integer
-instance c Float => GTraversable c Float
-instance c Double => GTraversable c Double
-instance c (Ratio n) => GTraversable c (Ratio n)
-instance c Char => GTraversable c Char
-instance c Ordering => GTraversable c Ordering
+instance GTraversable c ()
+instance GTraversable c Bool
+instance GTraversable c Int
+instance GTraversable c Integer
+instance GTraversable c Float
+instance GTraversable c Double
+instance GTraversable c (Ratio n)
+instance GTraversable c Char
+instance GTraversable c Ordering
deriveGTraversable ''Maybe
deriveGTraversable ''Either
deriveGTraversable ''(,)
deriveGTraversable ''(,,)
-- Uniform instance for lists
-instance (GTraversable c a, c a, c [a]) => GTraversable c [a] where
+instance c a => GTraversable c [a] where
gtraverse f = go where
go [] = pure []
go (x:xs) = (:) <$> f x <*> go xs

0 comments on commit c9a92f0

Please sign in to comment.