From: simonpj Date: Mon, 30 Apr 2001 10:50:00 +0000 (+0000) Subject: [project @ 2001-04-30 10:50:00 by simonpj] X-Git-Tag: Approximately_9120_patches~2063 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=55d04fc7a6fbd58358f284bd84648dad09046f60;p=ghc-hetmet.git [project @ 2001-04-30 10:50:00 by simonpj] Add comments in tcInstType --- 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)