[commit: ghc] wip/rae: Remove extraneous fundeps on (~) (7d8031b)

git at git.haskell.org git at git.haskell.org
Wed Feb 17 18:16:18 UTC 2016


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

On branch  : wip/rae
Link       : http://ghc.haskell.org/trac/ghc/changeset/7d8031ba3d36a9378a40834aa3e3817d8f7f310f/ghc

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

commit 7d8031ba3d36a9378a40834aa3e3817d8f7f310f
Author: Richard Eisenberg <eir at cis.upenn.edu>
Date:   Thu Feb 4 18:31:25 2016 -0500

    Remove extraneous fundeps on (~)


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

7d8031ba3d36a9378a40834aa3e3817d8f7f310f
 libraries/base/Data/Type/Equality.hs | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/libraries/base/Data/Type/Equality.hs b/libraries/base/Data/Type/Equality.hs
index 75d2a6c..e7363d2 100644
--- a/libraries/base/Data/Type/Equality.hs
+++ b/libraries/base/Data/Type/Equality.hs
@@ -54,7 +54,7 @@ import Data.Type.Bool
 -- | Lifted, homogeneous equality. By lifted, we mean that it can be
 -- bogus (deferred type error). By homogeneous, the two types @a@
 -- and @b@ must have the same kind.
-class a ~~ b => (a :: k) ~ (b :: k) | a -> b, b -> a
+class a ~~ b => (a :: k) ~ (b :: k)
   -- See Note [The equality types story] in TysPrim
   -- NB: All this class does is to wrap its superclass, which is
   --     the "real", inhomogeneous equality; this is needed when
@@ -62,6 +62,10 @@ class a ~~ b => (a :: k) ~ (b :: k) | a -> b, b -> a
   -- NB: Not exported, as (~) is magical syntax. That's also why there's
   -- no fixity.
 
+  -- It's tempting to put functional dependencies on (~), but it's not
+  -- necessary because the functional-depedency coverage check looks
+  -- through superclasses, and (~#) is handled in that check.
+
 instance {-# INCOHERENT #-} a ~~ b => a ~ b
   -- See Note [The equality types story] in TysPrim
   -- If we have a Wanted (t1 ~ t2), we want to immediately



More information about the ghc-commits mailing list