[commit: ghc] typeable-with-kinds: We still need `DataTypeable` when deriving `Data` (was removed accidentally) (53cb59d)

git at git.haskell.org git at git.haskell.org
Wed Feb 11 21:56:18 UTC 2015


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

On branch  : typeable-with-kinds
Link       : http://ghc.haskell.org/trac/ghc/changeset/53cb59d5002c6ca3e0dde8a1aaf5c3e9f7b7966d/ghc

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

commit 53cb59d5002c6ca3e0dde8a1aaf5c3e9f7b7966d
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)


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

53cb59d5002c6ca3e0dde8a1aaf5c3e9f7b7966d
 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 b96014f..72fba3c 100644
--- a/compiler/typecheck/TcDeriv.hs
+++ b/compiler/typecheck/TcDeriv.hs
@@ -1190,7 +1190,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