X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Ftypecheck%2FTcType.lhs;h=4df862cb166edf770f55293172c854554321c434;hb=55d04fc7a6fbd58358f284bd84648dad09046f60;hp=2cee03e33c55918a95af6cd4ce84eeff431e46a3;hpb=73b92b542bb06d33cffd0f548603dd0a4872294a;p=ghc-hetmet.git diff --git a/ghc/compiler/typecheck/TcType.lhs b/ghc/compiler/typecheck/TcType.lhs index 2cee03e..4df862c 100644 --- a/ghc/compiler/typecheck/TcType.lhs +++ b/ghc/compiler/typecheck/TcType.lhs @@ -188,8 +188,11 @@ fresh type variables, splits off the dictionary part, and returns the results. tcInstType :: TcType -> NF_TcM ([TcTyVar], TcThetaType, TcType) tcInstType ty = case splitForAllTys ty of - ([], rho) -> tcSplitRhoTy rho `thenNF_Tc` \ (theta, tau) -> + ([], rho) -> -- There may be overloading but no type variables; + -- (?x :: Int) => Int -> Int + tcSplitRhoTy rho `thenNF_Tc` \ (theta, tau) -> returnNF_Tc ([], theta, tau) + (tyvars, rho) -> tcInstTyVars tyvars `thenNF_Tc` \ (tyvars', _, tenv) -> tcSplitRhoTy (substTy tenv rho) `thenNF_Tc` \ (theta, tau) -> returnNF_Tc (tyvars', theta, tau)