mkListTy,
-- * Tuples
- mkTupleTy,
+ mkTupleTy, mkBoxedTupleTy,
tupleTyCon, tupleCon,
unitTyCon, unitDataCon, unitDataConId, pairTyCon,
unboxedSingletonTyCon, unboxedSingletonDataCon,
mkTupleTyCon, mkAlgTyCon, tyConName,
TyConParent(NoParentTyCon) )
-import BasicTypes ( Arity, RecFlag(..), Boxity(..), isBoxed,
- StrictnessMark(..) )
+import BasicTypes ( Arity, RecFlag(..), Boxity(..), isBoxed, HsBang(..) )
import Type ( Type, mkTyConTy, mkTyConApp, mkTyVarTy, mkTyVarTys,
TyThing(..) )
= data_con
where
data_con = mkDataCon dc_name declared_infix
- (map (const NotMarkedStrict) arg_tys)
+ (map (const HsNoBang) arg_tys)
[] -- No labelled fields
tyvars
[] -- No existential type variables
mkTupleTy boxity [ty] | Boxed <- boxity = ty
mkTupleTy boxity tys = mkTyConApp (tupleTyCon boxity (length tys)) tys
+-- | Build the type of a small tuple that holds the specified type of thing
+mkBoxedTupleTy :: [Type] -> Type
+mkBoxedTupleTy tys = mkTupleTy Boxed tys
+
unitTy :: Type
unitTy = mkTupleTy Boxed []
\end{code}