[commit: ghc] ghc-8.0: Revert "Remove extraneous fundeps on (~)" (881b6cc)

git at git.haskell.org git at git.haskell.org
Mon Feb 22 10:45:09 UTC 2016


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

On branch  : ghc-8.0
Link       : http://ghc.haskell.org/trac/ghc/changeset/881b6ccf5c1dbc09d1d16b1b4643e3dec9387047/ghc

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

commit 881b6ccf5c1dbc09d1d16b1b4643e3dec9387047
Author: Herbert Valerio Riedel <hvr at gnu.org>
Date:   Mon Feb 22 00:36:41 2016 +0100

    Revert "Remove extraneous fundeps on (~)"
    
    This is causing compile-time regressions, see #11608 for more details.
    
    This reverts commit e1631b3b58b7440d3d5a8bf72f1490df635792fb.


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

881b6ccf5c1dbc09d1d16b1b4643e3dec9387047
 libraries/base/Data/Type/Equality.hs | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/libraries/base/Data/Type/Equality.hs b/libraries/base/Data/Type/Equality.hs
index e7363d2..75d2a6c 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)
+class a ~~ b => (a :: k) ~ (b :: k) | a -> b, b -> a
   -- 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,10 +62,6 @@ class a ~~ b => (a :: k) ~ (b :: k)
   -- 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