%* *
%************************************************************************
-tcHsType and tcHsTypeKind
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+tcHsSigType and tcHsBoxedSigType
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tcHsSigType and tcHsBoxedSigType are used for type signatures written by the programmer
\end{code}
-The main work horse
-~~~~~~~~~~~~~~~~~~~
+tcHsType, the main work horse
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\begin{code}
tcHsType :: RenamedHsType -> TcM s Type
import TcHsSyn ( TcMonoBinds, idsToMonoBinds )
import BasicTypes ( RecFlag(..), NewOrData(..) )
-import TcMonoType ( tcHsSigType, tcHsBoxedSigType, kcTyVarScope, tcClassContext,
+import TcMonoType ( tcHsType, tcHsSigType, tcHsBoxedSigType, kcTyVarScope, tcClassContext,
kcHsContext, kcHsSigType, mkImmutTyVars
)
import TcEnv ( tcExtendTyVarEnv, tcLookupTy, tcLookupValueByKey, TyThing(..), TyThingDetails(..) )
tcTyDecl1 (TySynonym tycon_name tyvar_names rhs src_loc)
= tcLookupTy tycon_name `thenNF_Tc` \ (ATyCon tycon) ->
tcExtendTyVarEnv (tyConTyVars tycon) $
- tcHsSigType rhs `thenTc` \ rhs_ty ->
+ tcHsType rhs `thenTc` \ rhs_ty ->
-- If the RHS mentions tyvars that aren't in scope, we'll
-- quantify over them. With gla-exts that's right, but for H98
-- we should complain. We can now do that here without falling into