diff options
-rw-r--r-- | compiler/typecheck/TcSMonad.lhs | 12 | ||||
-rw-r--r-- | compiler/typecheck/TcUnify.lhs | 21 | ||||
-rw-r--r-- | compiler/typecheck/TcUnify.lhs-boot | 5 |
3 files changed, 2 insertions, 36 deletions
diff --git a/compiler/typecheck/TcSMonad.lhs b/compiler/typecheck/TcSMonad.lhs index dd5b56116b..930444a1ba 100644 --- a/compiler/typecheck/TcSMonad.lhs +++ b/compiler/typecheck/TcSMonad.lhs @@ -81,8 +81,6 @@ module TcSMonad ( newFlexiTcSTy, instFlexiTcS, instFlexiTcSHelperTcS, cloneMetaTyVar, - mkKindErrorCtxtTcS, - Untouchables, isTouchableMetaTyVarTcS, isFilledMetaTyVar_maybe, zonkTyVarsAndFV, @@ -110,7 +108,6 @@ import qualified TcRnMonad as TcM import qualified TcMType as TcM import qualified TcEnv as TcM ( checkWellStaged, topIdLvl, tcGetDefaultTys ) -import {-# SOURCE #-} qualified TcUnify as TcM ( mkKindErrorCtxt ) import Kind import TcType import DynFlags @@ -147,15 +144,6 @@ import Digraph #endif \end{code} - -\begin{code} -mkKindErrorCtxtTcS :: Type -> Kind - -> Type -> Kind - -> ErrCtxt -mkKindErrorCtxtTcS ty1 ki1 ty2 ki2 - = (False,TcM.mkKindErrorCtxt ty1 ty2 ki1 ki2) -\end{code} - %************************************************************************ %* * %* Worklists * diff --git a/compiler/typecheck/TcUnify.lhs b/compiler/typecheck/TcUnify.lhs index 4749d0c0b1..1053340d83 100644 --- a/compiler/typecheck/TcUnify.lhs +++ b/compiler/typecheck/TcUnify.lhs @@ -31,11 +31,7 @@ module TcUnify ( matchExpectedAppTy, matchExpectedFunTys, matchExpectedFunKind, - wrapFunResCoercion, - - -------------------------------- - -- Errors - mkKindErrorCtxt + wrapFunResCoercion ) where @@ -1200,19 +1196,4 @@ uUnboundKVar kv1 non_var_k2 ; case occurCheckExpand dflags kv1 k2b of OC_OK k2c -> do { writeMetaTyVar kv1 k2c; return (Just EQ) } _ -> return Nothing } - -mkKindErrorCtxt :: Type -> Type -> Kind -> Kind -> TidyEnv -> TcM (TidyEnv, SDoc) -mkKindErrorCtxt ty1 ty2 k1 k2 env0 - = let (env1, ty1') = tidyOpenType env0 ty1 - (env2, ty2') = tidyOpenType env1 ty2 - (env3, k1' ) = tidyOpenKind env2 k1 - (env4, k2' ) = tidyOpenKind env3 k2 - in do ty1 <- zonkTcType ty1' - ty2 <- zonkTcType ty2' - k1 <- zonkTcKind k1' - k2 <- zonkTcKind k2' - return (env4, - vcat [ ptext (sLit "Kind incompatibility when matching types xx:") - , nest 2 (vcat [ ppr ty1 <+> dcolon <+> ppr k1 - , ppr ty2 <+> dcolon <+> ppr k2 ]) ]) \end{code} diff --git a/compiler/typecheck/TcUnify.lhs-boot b/compiler/typecheck/TcUnify.lhs-boot index aa93536705..35a7155a08 100644 --- a/compiler/typecheck/TcUnify.lhs-boot +++ b/compiler/typecheck/TcUnify.lhs-boot @@ -1,14 +1,11 @@ \begin{code} module TcUnify where -import TcType ( TcTauType, Type, Kind ) -import VarEnv ( TidyEnv ) +import TcType ( TcTauType ) import TcRnTypes ( TcM ) import TcEvidence ( TcCoercion ) -import Outputable ( SDoc ) -- This boot file exists only to tie the knot between -- TcUnify and Inst unifyType :: TcTauType -> TcTauType -> TcM TcCoercion -mkKindErrorCtxt :: Type -> Type -> Kind -> Kind -> TidyEnv -> TcM (TidyEnv, SDoc) \end{code} |