[commit: ghc] wip/tc/typeable-with-kinds: We still need `DataTypeable` when deriving `Data` (was removed accidentally) (7518644)

git at git.haskell.org git at git.haskell.org
Sat Mar 7 16:43:28 UTC 2015


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

On branch  : wip/tc/typeable-with-kinds
Link       : http://ghc.haskell.org/trac/ghc/changeset/7518644147b2fa23668bb8433b78475113990a15/ghc

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

commit 7518644147b2fa23668bb8433b78475113990a15
Author: Iavor S. Diatchki <diatchki at galois.com>
Date:   Wed Feb 11 13:58:16 2015 -0800

    We still need `DataTypeable` when deriving `Data` (was removed accidentally)


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

7518644147b2fa23668bb8433b78475113990a15
 compiler/typecheck/TcDeriv.hs | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/compiler/typecheck/TcDeriv.hs b/compiler/typecheck/TcDeriv.hs
index 72e3b89..c237269 100644
--- a/compiler/typecheck/TcDeriv.hs
+++ b/compiler/typecheck/TcDeriv.hs
@@ -1191,7 +1191,8 @@ sideConditions mtheta cls
   | cls_key == enumClassKey        = Just (cond_std `andCond` cond_isEnumeration)
   | cls_key == ixClassKey          = Just (cond_std `andCond` cond_enumOrProduct cls)
   | cls_key == boundedClassKey     = Just (cond_std `andCond` cond_enumOrProduct cls)
-  | cls_key == dataClassKey        = Just (cond_std `andCond`
+  | cls_key == dataClassKey        = Just (checkFlag Opt_DeriveDataTypeable `andCond`
+                                           cond_std `andCond`
                                            cond_args cls)
   | cls_key == functorClassKey     = Just (checkFlag Opt_DeriveFunctor `andCond`
                                            cond_vanilla `andCond`



More information about the ghc-commits mailing list