summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
73b92b5)
Add comments in tcInstType
tcInstType :: TcType -> NF_TcM ([TcTyVar], TcThetaType, TcType)
tcInstType ty
= case splitForAllTys ty of
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)
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)
(tyvars, rho) -> tcInstTyVars tyvars `thenNF_Tc` \ (tyvars', _, tenv) ->
tcSplitRhoTy (substTy tenv rho) `thenNF_Tc` \ (theta, tau) ->
returnNF_Tc (tyvars', theta, tau)