-- re-exported from TcEnv
TcId, tcInstId,
- maybeBoxedPrimType,
-
zonkTopBinds, zonkId, zonkIdOcc,
zonkForeignExports, zonkRules
) where
import TcType ( TcType, TcTyVar,
zonkTcTypeToType, zonkTcTyVarToTyVar, zonkTcTyVarBndr, zonkTcType
)
-import TyCon ( isDataTyCon )
-import Type ( mkTyVarTy, splitAlgTyConApp_maybe, isUnLiftedType, Type )
+import Type ( mkTyVarTy, isUnLiftedType, Type )
import Name ( isLocallyDefined )
import Var ( TyVar )
import VarEnv ( TyVarEnv, emptyVarEnv, extendVarEnvList )
%* *
%************************************************************************
-Some gruesome hackery for desugaring ccalls. It's here because if we put it
-in Type.lhs we get irritating loops, and it's only used by TcInstDcls.lhs and
-DsCCall.lhs.
-
-\begin{code}
-maybeBoxedPrimType :: Type -> Maybe (DataCon, Type)
-maybeBoxedPrimType ty
- = case splitProductType_maybe ty of -- Product data type
- Just (tycon, tys_applied, data_con, [data_con_arg_ty]) -- constr has one arg
- | isUnLiftedType data_con_arg_ty -- which is primitive
- -> Just (data_con, data_con_arg_ty)
-
- other_cases -> Nothing
-\end{code}
-
-%************************************************************************
-%* *
-\subsection[BackSubst-HsBinds]{Running a substitution over @HsBinds@}
-%* *
-%************************************************************************
-
This zonking pass runs over the bindings
a) to convert TcTyVars to TyVars etc, dereferencing any bindings etc