[commit: ghc] wip/tc/typeable-with-kinds: Disable `Ignoring derive Typeable` warnings. (4350fba)
git at git.haskell.org
git at git.haskell.org
Sat Mar 7 16:43:47 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/tc/typeable-with-kinds
Link : http://ghc.haskell.org/trac/ghc/changeset/4350fbaacf929900f9ecfdb0aabda904ea3e912b/ghc
>---------------------------------------------------------------
commit 4350fbaacf929900f9ecfdb0aabda904ea3e912b
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.
>---------------------------------------------------------------
4350fbaacf929900f9ecfdb0aabda904ea3e912b
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 c237269..2cc8902 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 b7f2623..f2bb494 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