[commit: ghc] wip/tc/typeable-with-kinds: Fix type checking fallout in Data.hs (2540a1f)
git at git.haskell.org
git at git.haskell.org
Sat Mar 7 16:44:12 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/tc/typeable-with-kinds
Link : http://ghc.haskell.org/trac/ghc/changeset/2540a1f9d3728e815c4a491a109df7af5544bfc3/ghc
>---------------------------------------------------------------
commit 2540a1f9d3728e815c4a491a109df7af5544bfc3
Author: Austin Seipp <austin at well-typed.com>
Date: Sat Mar 7 09:49:05 2015 -0600
Fix type checking fallout in Data.hs
Signed-off-by: Austin Seipp <austin at well-typed.com>
>---------------------------------------------------------------
2540a1f9d3728e815c4a491a109df7af5544bfc3
libraries/base/Data/Data.hs | 2 +-
testsuite/tests/annotations/should_fail/annfail10.stderr | 5 ++---
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/libraries/base/Data/Data.hs b/libraries/base/Data/Data.hs
index 34c2350..7fe9c4d 100644
--- a/libraries/base/Data/Data.hs
+++ b/libraries/base/Data/Data.hs
@@ -1504,7 +1504,7 @@ altConstr = mkConstr altDataType "Alt" ["getAlt"] Prefix
altDataType :: DataType
altDataType = mkDataType "Alt" [altConstr]
-instance (Data (f a), Typeable f, Typeable a) => Data (Alt f a) where
+instance (Data (f a), Data a, Typeable f) => Data (Alt f a) where
gfoldl f z (Alt x) = (z Alt `f` x)
gunfold k z _ = k (z Alt)
toConstr (Alt _) = altConstr
diff --git a/testsuite/tests/annotations/should_fail/annfail10.stderr b/testsuite/tests/annotations/should_fail/annfail10.stderr
index 262677b..5b42bd3 100644
--- a/testsuite/tests/annotations/should_fail/annfail10.stderr
+++ b/testsuite/tests/annotations/should_fail/annfail10.stderr
@@ -7,9 +7,8 @@ annfail10.hs:9:1:
Data.Data.Data (Either a b)
-- Defined in ‘Data.Data’
instance Data.Data.Data Data.Monoid.All -- Defined in ‘Data.Data’
- instance forall (k :: BOX) (f :: k -> *) (a :: k).
- (Data.Data.Data (f a), Data.Typeable.Internal.Typeable f,
- Data.Typeable.Internal.Typeable a) =>
+ instance (Data.Data.Data (f a), Data.Data.Data a,
+ Data.Typeable.Internal.Typeable f) =>
Data.Data.Data (Data.Monoid.Alt f a)
-- Defined in ‘Data.Data’
...plus 39 others
More information about the ghc-commits
mailing list