Trim unused imports detected by new unused-import code
[ghc-hetmet.git] / compiler / typecheck / TcInstDcls.lhs
index 2435395..3272f96 100644 (file)
@@ -29,7 +29,6 @@ import TcSimplify
 import Type
 import Coercion
 import TyCon
-import TypeRep
 import DataCon
 import Class
 import Var
@@ -860,7 +859,7 @@ tcInstanceMethod loc clas tyvars dfun_dicts theta inst_tys
            (Nothing, NoDefMeth) -> do          -- No default method in the class
                        { warn <- doptM Opt_WarnMissingMethods          
                         ; warnTc (warn  -- Warn only if -fwarn-missing-methods
-                                 && reportIfUnused (getOccName sel_id))
+                                 && not (startsWithUnderscore (getOccName sel_id)))
                                        -- Don't warn about _foo methods
                                 omitted_meth_warn
                        ; return (error_rhs, emptyBag) }