diff --git a/compiler/simplCore/Simplify.lhs b/compiler/simplCore/Simplify.lhs
index cab6460e76235b7a66e1f150c34b09b4fa43dd72..f27dcab7cf67edd99f2ce789e0d7933f8fc8f2cd 100644
--- a/compiler/simplCore/Simplify.lhs
+++ b/compiler/simplCore/Simplify.lhs
@@ -17,8 +17,7 @@ import Id
 import Var
 import IdInfo
 import Coercion
-import DataCon		( dataConTyCon, dataConRepStrictness, dataConUnivTyVars )
-import TyCon		( tyConArity )
+import DataCon		( dataConRepStrictness, dataConUnivTyVars )
 import CoreSyn
 import NewDemand	( isStrictDmd )
 import PprCore		( pprParendExpr, pprCoreExpr )
diff --git a/compiler/typecheck/TcTyDecls.lhs b/compiler/typecheck/TcTyDecls.lhs
index c1a3389c9c9e522c03fbcdfda2245482e1dc6e29..d05ade3049165b0e0115454b581d3ab8e33c0fc0 100644
--- a/compiler/typecheck/TcTyDecls.lhs
+++ b/compiler/typecheck/TcTyDecls.lhs
@@ -24,8 +24,6 @@ import HscTypes
 import TyCon
 import Class
 import DataCon
-import Var
-import VarSet
 import Name
 import NameEnv
 import NameSet
@@ -280,6 +278,7 @@ new_tc_rhs tc = snd (newTyConRhs tc)	-- Ignore the type variables
 
 getTyCon (ATyCon tc) = tc
 getTyCon (AClass cl) = classTyCon cl
+getTyCon other       = panic "getTyCon"
 
 findLoopBreakers :: [(TyCon, [TyCon])] -> [Name]
 -- Finds a set of tycons that cut all loops
@@ -312,6 +311,7 @@ tcTyConsOfType ty
      go (PredTy (IParam _ ty))     = go ty
      go (PredTy (ClassP cls tys))  = go_tc (classTyCon cls) tys
      go (ForAllTy _ ty)	  	   = go ty
+     go other			   = panic "tcTyConsOfType"
 
      go_tc tc tys = extendNameEnv (go_s tys) (tyConName tc) tc
      go_s tys = foldr (plusNameEnv . go) emptyNameEnv tys