X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2FbasicTypes%2FDataCon.lhs;h=0fb7fae87bd61fd7f209d929dad180185620a178;hp=8829128aaaf925afecdbe2f9e9592ba57796fb14;hb=84923cc7de2a93c22a2f72daf9ac863959efae13;hpb=4b922606a68ee6402803b217ea899e9dd7f12f9b diff --git a/compiler/basicTypes/DataCon.lhs b/compiler/basicTypes/DataCon.lhs index 8829128..0fb7fae 100644 --- a/compiler/basicTypes/DataCon.lhs +++ b/compiler/basicTypes/DataCon.lhs @@ -1,4 +1,5 @@ % +% (c) The University of Glasgow 2006 % (c) The GRASP/AQUA Project, Glasgow University, 1998 % \section[DataCon]{@DataCon@: Data Constructors} @@ -29,26 +30,18 @@ module DataCon ( #include "HsVersions.h" -import Type ( Type, ThetaType, - substTyWith, substTyVar, mkTopTvSubst, - mkForAllTys, mkFunTys, mkTyConApp, mkTyVarTy, mkTyVarTys, - splitTyConApp_maybe, newTyConInstRhs, - mkPredTys, isStrictPred, pprType - ) -import Coercion ( isEqPred, mkEqPred ) -import TyCon ( TyCon, FieldLabel, tyConDataCons, - isProductTyCon, isTupleTyCon, isUnboxedTupleTyCon, - isNewTyCon, isClosedNewTyCon, isRecursiveTyCon, - tyConFamInst_maybe ) -import Class ( Class, classTyCon ) -import Name ( Name, NamedThing(..), nameUnique ) -import Var ( TyVar, Id ) -import BasicTypes ( Arity, StrictnessMark(..) ) +import Type +import Coercion +import TyCon +import Class +import Name +import Var +import BasicTypes import Outputable -import Unique ( Unique, Uniquable(..) ) -import ListSetOps ( assoc, minusList ) -import Util ( zipEqual, zipWithEqual ) -import Maybes ( expectJust ) +import Unique +import ListSetOps +import Util +import Maybes import FastString \end{code} @@ -316,6 +309,7 @@ data DataCon -- and *including* existential dictionaries dcRepStrictness :: [StrictnessMark], -- One for each *representation* argument + -- See also Note [Data-con worker strictness] in MkId.lhs dcRepType :: Type, -- Type of the constructor -- forall a x y. (a:=:(x,y), Ord x) => x -> y -> MkT a @@ -625,7 +619,7 @@ dataConUserType (MkData { dcUnivTyVars = univ_tvs, mkFunTys (mkPredTys theta) $ mkFunTys arg_tys $ case tyConFamInst_maybe tycon of - Nothing -> mkTyConApp tycon (map (substTyVar subst) univ_tvs) + Nothing -> mkTyConApp tycon (substTyVars subst univ_tvs) Just (ftc, insttys) -> mkTyConApp ftc insttys -- data instance where subst = mkTopTvSubst eq_spec