From 55d04fc7a6fbd58358f284bd84648dad09046f60 Mon Sep 17 00:00:00 2001 From: simonpj Date: Mon, 30 Apr 2001 10:50:00 +0000 Subject: [PATCH 1/1] [project @ 2001-04-30 10:50:00 by simonpj] Add comments in tcInstType --- ghc/compiler/typecheck/TcType.lhs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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) -- 1.7.10.4