[commit: ghc] typeable-with-kinds: Disable `Ignoring derive Typeable` warnings. (4003132)

git at git.haskell.org git at git.haskell.org
Thu Feb 12 01:11:46 UTC 2015


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

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

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

commit 4003132ff968dab0f28d92227061760cad6944dc
Author: Iavor S. Diatchki <diatchki at galois.com>
Date:   Wed Feb 11 17:13:17 2015 -0800

    Disable `Ignoring derive Typeable` warnings.
    
    Very many things in base derive Typeable, so we'll need a huge commit
    to remove these warning.  For the time being, I am jsut commenting out
    the warning.  Perhaps, it'd be better to control the behavior with
    a flag.


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

4003132ff968dab0f28d92227061760cad6944dc
 compiler/typecheck/TcDeriv.hs    | 4 ++--
 compiler/typecheck/TcInstDcls.hs | 6 ++++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/compiler/typecheck/TcDeriv.hs b/compiler/typecheck/TcDeriv.hs
index 72fba3c..fe1c299 100644
--- a/compiler/typecheck/TcDeriv.hs
+++ b/compiler/typecheck/TcDeriv.hs
@@ -685,7 +685,7 @@ deriveStandalone (L loc (DerivDecl deriv_ty overlap_mode))
        ; case tcSplitTyConApp_maybe inst_ty of
            Just (tc, tc_args)
               | className cls == typeableClassName
-              -> do addWarnTc (text "Standalone deriving `Typeable` has no effect.")
+              -> do -- addWarnTc (text "Standalone deriving `Typeable` has no effect.")
                     return []
 
               | isAlgTyCon tc  -- All other classes
@@ -720,7 +720,7 @@ deriveTyData tvs tc tc_args (L loc deriv_pred)
                 -- so the argument kind 'k' is not decomposable by splitKindFunTys
                 -- as is the case for all other derivable type classes
         ; if className cls == typeableClassName
-          then do addWarnTc (text "Deriving `Typeable` has no effect.")
+          then do -- addWarnTc (text "Deriving `Typeable` has no effect.")
                   return []
 
           else
diff --git a/compiler/typecheck/TcInstDcls.hs b/compiler/typecheck/TcInstDcls.hs
index dfa272f..f4a98a1 100644
--- a/compiler/typecheck/TcInstDcls.hs
+++ b/compiler/typecheck/TcInstDcls.hs
@@ -443,10 +443,12 @@ tcInstDecls1 tycl_decls inst_decls deriv_decls
       setSrcSpan (getSrcSpan (iSpec i)) $
         do env <- getGblEnv
            if isHsBootOrSig (tcg_src env)
-             then addWarnTc $ vcat
+             then return ()
+                {-
+                  addWarnTc $ vcat
                   [ ptext (sLit "`Typeable` instances in .hs-boot files are ignored.")
                   , ptext (sLit "This warning will become an error in future versions of the compiler.")
-                  ]
+                  ] -}
              else addErrTc $ ptext (sLit "Class `Typeable` does not support user-specified instances.")
 
 addClsInsts :: [InstInfo Name] -> TcM a -> TcM a



More information about the ghc-commits mailing list