summaryrefslogtreecommitdiff
path: root/compiler/typecheck
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/typecheck')
-rw-r--r--compiler/typecheck/ClsInst.hs2
-rw-r--r--compiler/typecheck/TcDeriv.hs2
-rw-r--r--compiler/typecheck/TcErrors.hs2
-rw-r--r--compiler/typecheck/TcHsSyn.hs1
-rw-r--r--compiler/typecheck/TcInstDcls.hs-boot1
-rw-r--r--compiler/typecheck/TcInteract.hs2
-rw-r--r--compiler/typecheck/TcPatSyn.hs3
-rw-r--r--compiler/typecheck/TcRnTypes.hs3
-rw-r--r--compiler/typecheck/TcSMonad.hs1
-rw-r--r--compiler/typecheck/TcTypeable.hs1
10 files changed, 6 insertions, 12 deletions
diff --git a/compiler/typecheck/ClsInst.hs b/compiler/typecheck/ClsInst.hs
index de957b71fd..c0a54e48cc 100644
--- a/compiler/typecheck/ClsInst.hs
+++ b/compiler/typecheck/ClsInst.hs
@@ -29,9 +29,7 @@ import Id
import Type
import MkCore ( mkStringExprFS, mkNaturalExpr )
-import Unique ( hasKey )
import Name ( Name )
-import Var ( DFunId )
import DataCon
import TyCon
import Class
diff --git a/compiler/typecheck/TcDeriv.hs b/compiler/typecheck/TcDeriv.hs
index 6f749fc60f..409cccbc72 100644
--- a/compiler/typecheck/TcDeriv.hs
+++ b/compiler/typecheck/TcDeriv.hs
@@ -26,7 +26,7 @@ import TcValidity( allDistinctTyVars )
import TcClassDcl( instDeclCtxt3, tcATDefault, tcMkDeclCtxt )
import TcEnv
import TcGenDeriv -- Deriv stuff
-import TcValidity
+import TcValidity( checkValidInstHead )
import InstEnv
import Inst
import FamInstEnv
diff --git a/compiler/typecheck/TcErrors.hs b/compiler/typecheck/TcErrors.hs
index bc5b061a9e..ce75259203 100644
--- a/compiler/typecheck/TcErrors.hs
+++ b/compiler/typecheck/TcErrors.hs
@@ -64,7 +64,7 @@ import qualified Data.Set as Set
import {-# SOURCE #-} TcHoleErrors ( findValidHoleFits )
-import Data.Semigroup ( Semigroup )
+-- import Data.Semigroup ( Semigroup )
import qualified Data.Semigroup as Semigroup
diff --git a/compiler/typecheck/TcHsSyn.hs b/compiler/typecheck/TcHsSyn.hs
index 77e2a246cb..ee00acaad3 100644
--- a/compiler/typecheck/TcHsSyn.hs
+++ b/compiler/typecheck/TcHsSyn.hs
@@ -56,7 +56,6 @@ import TcEvidence
import TysPrim
import TyCon
import TysWiredIn
-import TyCoRep( CoercionHole(..) )
import Type
import Coercion
import ConLike
diff --git a/compiler/typecheck/TcInstDcls.hs-boot b/compiler/typecheck/TcInstDcls.hs-boot
index e7240903e4..ea0f50fd36 100644
--- a/compiler/typecheck/TcInstDcls.hs-boot
+++ b/compiler/typecheck/TcInstDcls.hs-boot
@@ -9,7 +9,6 @@ import HsSyn
import TcRnTypes
import TcEnv( InstInfo )
import TcDeriv
-import HsExtension ( GhcRn )
-- We need this because of the mutual recursion
-- between TcTyClsDecls and TcInstDcls
diff --git a/compiler/typecheck/TcInteract.hs b/compiler/typecheck/TcInteract.hs
index 028b755187..cb1747cdb0 100644
--- a/compiler/typecheck/TcInteract.hs
+++ b/compiler/typecheck/TcInteract.hs
@@ -27,7 +27,7 @@ import Class
import TyCon
import FunDeps
import FamInst
-import ClsInst( ClsInstResult(..), InstanceWhat(..), safeOverlap )
+import ClsInst( InstanceWhat(..), safeOverlap )
import FamInstEnv
import Unify ( tcUnifyTyWithTFs, ruleMatchTyKiX )
diff --git a/compiler/typecheck/TcPatSyn.hs b/compiler/typecheck/TcPatSyn.hs
index fabe16a1e0..c9dbc0f02f 100644
--- a/compiler/typecheck/TcPatSyn.hs
+++ b/compiler/typecheck/TcPatSyn.hs
@@ -17,10 +17,9 @@ import GhcPrelude
import HsSyn
import TcPat
-import Type( mkEmptyTCvSubst, tidyTyVarBinders, tidyTypes, tidyType )
+import Type( tidyTyVarBinders, tidyTypes, tidyType )
import TcRnMonad
import TcSigs( emptyPragEnv, completeSigFromId )
-import TcType( mkMinimalBySCs )
import TcEnv
import TcMType
import TcHsSyn( zonkTyVarBindersX, zonkTcTypeToTypes
diff --git a/compiler/typecheck/TcRnTypes.hs b/compiler/typecheck/TcRnTypes.hs
index ca5639b297..b240585f65 100644
--- a/compiler/typecheck/TcRnTypes.hs
+++ b/compiler/typecheck/TcRnTypes.hs
@@ -155,7 +155,7 @@ import TcEvidence
import Type
import Class ( Class )
import TyCon ( TyCon, TyConFlavour, tyConKind )
-import TyCoRep ( CoercionHole(..), coHoleCoVar )
+import TyCoRep ( coHoleCoVar )
import Coercion ( Coercion, mkHoleCo )
import ConLike ( ConLike(..) )
import DataCon ( DataCon, dataConUserType, dataConOrigArgTys )
@@ -556,6 +556,7 @@ data TcGblEnv
tcg_dus :: DefUses, -- ^ What is defined in this module and what is used.
tcg_used_gres :: TcRef [GlobalRdrElt], -- ^ Records occurrences of imported entities
+ -- One entry for each occurrence; but may have different GREs for the same Name
-- See Note [Tracking unused binding and imports]
tcg_keep :: TcRef NameSet,
diff --git a/compiler/typecheck/TcSMonad.hs b/compiler/typecheck/TcSMonad.hs
index 5bf5cefe01..ad7d332781 100644
--- a/compiler/typecheck/TcSMonad.hs
+++ b/compiler/typecheck/TcSMonad.hs
@@ -143,7 +143,6 @@ import Kind
import TcType
import DynFlags
import Type
-import TyCoRep( coHoleCoVar )
import Coercion
import Unify
diff --git a/compiler/typecheck/TcTypeable.hs b/compiler/typecheck/TcTypeable.hs
index ad266f658f..146c8515b6 100644
--- a/compiler/typecheck/TcTypeable.hs
+++ b/compiler/typecheck/TcTypeable.hs
@@ -31,7 +31,6 @@ import Type
import Kind ( isTYPEApp )
import TyCon
import DataCon
-import Name ( getOccName )
import Module
import HsSyn
import DynFlags