Trim unused imports detected by new unused-import code
[ghc-hetmet.git] / compiler / typecheck / TcTyClsDecls.lhs
index 633dc52..738d36f 100644 (file)
@@ -13,7 +13,6 @@ module TcTyClsDecls (
 #include "HsVersions.h"
 
 import HsSyn
-import HsTypes
 import HscTypes
 import BuildTyCl
 import TcUnify
@@ -36,7 +35,6 @@ import IdInfo
 import Var
 import VarSet
 import Name
-import OccName
 import Outputable
 import Maybes
 import Monad
@@ -52,7 +50,6 @@ import BasicTypes
 
 import Bag
 import Data.List
-import Control.Monad    ( mplus )
 \end{code}
 
 
@@ -693,9 +690,6 @@ tcTyClDecl1 _calc_isrec
   ; idx_tys <- doptM Opt_TypeFamilies
   ; checkTc idx_tys $ badFamInstDecl tc_name
 
-        -- Check for no type indices
-  ; checkTc (not (null tvs)) (noIndexTypes tc_name)
-
   ; tycon <- buildSynTyCon tc_name tvs' (OpenSynTyCon kind Nothing) kind Nothing
   ; return [ATyCon tycon]
   }
@@ -714,9 +708,6 @@ tcTyClDecl1 _calc_isrec
   ; idx_tys <- doptM Opt_TypeFamilies
   ; checkTc idx_tys $ badFamInstDecl tc_name
 
-        -- Check for no type indices
-  ; checkTc (not (null tvs)) (noIndexTypes tc_name)
-
   ; tycon <- buildAlgTyCon tc_name final_tvs [] 
               mkOpenDataTyConRhs Recursive False True Nothing
   ; return [ATyCon tycon]
@@ -1500,11 +1491,6 @@ badSigTyDecl tc_name
           quotes (ppr tc_name)
         , nest 2 (parens $ ptext (sLit "Use -XKindSignatures to allow kind signatures")) ]
 
-noIndexTypes :: Name -> SDoc
-noIndexTypes tc_name
-  = ptext (sLit "Type family constructor") <+> quotes (ppr tc_name)
-    <+> ptext (sLit "must have at least one type index parameter")
-
 badFamInstDecl :: Outputable a => a -> SDoc
 badFamInstDecl tc_name
   = vcat [ ptext (sLit "Illegal family instance for") <+>