From b7e80ae005d0072eda79135c371a794dc48f70e1 Mon Sep 17 00:00:00 2001 From: Simon Peyton Jones Date: Mon, 21 May 2018 09:00:32 +0100 Subject: Remove TcType.toTcType In the olden days we insisted that only TcTyVars could appear in a TcType. But now we are more accommodating; see TcType Note [TcTyVars and TyVars in the typechecker] This patch removes a function that converted a Type to a TcType. It didn't do anything useful except statisfy an invariant that we no longer have. Now it's gone. --- compiler/deSugar/Match.hs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'compiler/deSugar/Match.hs') diff --git a/compiler/deSugar/Match.hs b/compiler/deSugar/Match.hs index 0044cbe49f..6b548a4f5a 100644 --- a/compiler/deSugar/Match.hs +++ b/compiler/deSugar/Match.hs @@ -39,7 +39,6 @@ import MatchCon import MatchLit import Type import Coercion ( eqCoercion ) -import TcType ( toTcTypeBag ) import TyCon( isNewTyCon ) import TysWiredIn import SrcLoc @@ -733,7 +732,7 @@ matchWrapper ctxt mb_scr (MG { mg_alts = L _ matches mk_eqn_info vars (L _ (Match { m_pats = pats, m_grhss = grhss })) = do { dflags <- getDynFlags ; let upats = map (unLoc . decideBangHood dflags) pats - dicts = toTcTypeBag (collectEvVarsPats upats) -- Only TcTyVars + dicts = collectEvVarsPats upats ; tm_cs <- genCaseTmCs2 mb_scr upats vars ; match_result <- addDictsDs dicts $ -- See Note [Type and Term Equality Propagation] addTmCsDs tm_cs $ -- See Note [Type and Term Equality Propagation] -- cgit v1.2.1