X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Ftypecheck%2FTcMType.lhs;h=11ec9d9232c4313889319aa5f5a34276e8de8085;hb=2026e951c4811e0aaf44212426c7048cf5e8d0e8;hp=6a2041e844c4ac546fee127b35d28a4c5c8767f2;hpb=156fb5686ba6d7e121e0b876ff212268ebae444a;p=ghc-hetmet.git diff --git a/compiler/typecheck/TcMType.lhs b/compiler/typecheck/TcMType.lhs index 6a2041e..11ec9d9 100644 --- a/compiler/typecheck/TcMType.lhs +++ b/compiler/typecheck/TcMType.lhs @@ -24,7 +24,7 @@ module TcMType ( -------------------------------- -- Instantiation - tcInstTyVar, tcInstType, tcInstTyVars, tcInstBoxy, tcInstBoxyTyVar, + tcInstTyVar, tcInstType, tcInstTyVars, tcInstBoxyTyVar, tcInstSigTyVars, zonkSigTyVar, tcInstSkolTyVar, tcInstSkolTyVars, tcInstSkolType, tcSkolSigType, tcSkolSigTyVars, @@ -58,8 +58,7 @@ import TypeRep ( Type(..), PredType(..), -- Friend; can see representation import TcType ( TcType, TcThetaType, TcTauType, TcPredType, TcTyVarSet, TcKind, TcTyVar, TcTyVarDetails(..), MetaDetails(..), SkolemInfo(..), BoxInfo(..), - BoxyTyVar, BoxyType, BoxyThetaType, BoxySigmaType, - UserTypeCtxt(..), + BoxyTyVar, BoxyType, UserTypeCtxt(..), isMetaTyVar, isSigTyVar, metaTvRef, tcCmpPred, isClassPred, tcGetTyVar, tcSplitPhiTy, tcSplitPredTy_maybe, tcSplitAppTy_maybe, @@ -201,9 +200,13 @@ newMetaTyVar box_info kind ; ref <- newMutVar Flexi ; ; let name = mkSysTvName uniq fs fs = case box_info of - BoxTv -> FSLIT("bx") + BoxTv -> FSLIT("t") TauTv -> FSLIT("t") SigTv _ -> FSLIT("a") + -- We give BoxTv and TauTv the same string, because + -- otherwise we get user-visible differences in error + -- messages, which are confusing. If you want to see + -- the box_info of each tyvar, use -dppr-debug ; return (mkTcTyVar name kind (MetaTv box_info ref)) } instMetaTyVar :: BoxInfo -> TyVar -> TcM TcTyVar @@ -327,12 +330,6 @@ readFilledBox box_tv = ASSERT( isBoxyTyVar box_tv ) tcInstBoxyTyVar :: TyVar -> TcM BoxyTyVar -- Instantiate with a BOXY type variable tcInstBoxyTyVar tyvar = instMetaTyVar BoxTv tyvar - -tcInstBoxy :: TcType -> TcM ([BoxyTyVar], BoxyThetaType, BoxySigmaType) --- tcInstType instantiates the outer-level for-alls of a TcType with --- fresh BOXY type variables, splits off the dictionary part, --- and returns the pieces. -tcInstBoxy ty = tcInstType (mapM tcInstBoxyTyVar) ty \end{code}