import {-# SOURCE #-} Subst( substTyWith )
import {-# SOURCE #-} PprType( pprType )
-import Type ( Type, TauType, ThetaType,
+import Type ( Type, ThetaType,
mkForAllTys, mkFunTys, mkTyConApp,
mkTyVarTys, splitTyConApp_maybe, repType,
mkPredTys, isStrictType
import CmdLineOpts ( opt_UnboxStrictFields )
import Maybe
import ListSetOps ( assoc )
-import Util ( zipEqual, zipWithEqual )
+import Util ( zipEqual, zipWithEqual, equalLength )
\end{code}
-> [StrictnessMark] -> [FieldLabel]
-> [TyVar] -> ThetaType
-> [TyVar] -> ThetaType
- -> [TauType] -> TyCon
+ -> [Type] -> TyCon
-> Id -> Id
-> DataCon
-- Can get the tag from the TyCon
mkDataCon name arg_stricts fields
tyvars theta ex_tyvars ex_theta orig_arg_tys tycon
work_id wrap_id
- = ASSERT(length arg_stricts == length orig_arg_tys)
+ = ASSERT(equalLength arg_stricts orig_arg_tys)
-- The 'stricts' passed to mkDataCon are simply those for the
-- source-language arguments. We add extra ones for the
-- dictionary arguments right here.
dataConSig :: DataCon -> ([TyVar], ThetaType,
[TyVar], ThetaType,
- [TauType], TyCon)
+ [Type], TyCon)
dataConSig (MkData {dcTyVars = tyvars, dcTheta = theta,
dcExTyVars = ex_tyvars, dcExTheta = ex_theta,
dataConOrigArgTys :: DataCon -> [Type]
dataConOrigArgTys dc = dcOrigArgTys dc
-dataConRepArgTys :: DataCon -> [TauType]
+dataConRepArgTys :: DataCon -> [Type]
dataConRepArgTys dc = dcRepArgTys dc
\end{code}