From: simonmar Date: Mon, 17 Nov 2003 14:45:17 +0000 (+0000) Subject: [project @ 2003-11-17 14:45:17 by simonmar] X-Git-Tag: Approx_11550_changesets_converted~234 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=92bda9779666c90849c07e2c468304631089ba63;p=ghc-hetmet.git [project @ 2003-11-17 14:45:17 by simonmar] GC dead code. --- diff --git a/ghc/compiler/types/TyCon.lhs b/ghc/compiler/types/TyCon.lhs index dc81d81..e81a2a3 100644 --- a/ghc/compiler/types/TyCon.lhs +++ b/ghc/compiler/types/TyCon.lhs @@ -10,7 +10,7 @@ module TyCon( AlgTyConFlavour(..), DataConDetails(..), visibleDataCons, - isFunTyCon, isUnLiftedTyCon, isBoxedTyCon, isProductTyCon, + isFunTyCon, isUnLiftedTyCon, isProductTyCon, isAlgTyCon, isDataTyCon, isSynTyCon, isNewTyCon, isPrimTyCon, isEnumerationTyCon, isTupleTyCon, isUnboxedTupleTyCon, isBoxedTupleTyCon, tupleTyConBoxity, @@ -28,8 +28,6 @@ module TyCon( mkKindCon, mkSuperKindCon, - setTyConName, - tyConName, tyConKind, tyConUnique, @@ -46,8 +44,6 @@ module TyCon( maybeTyConSingleCon, - matchesTyCon, - -- Generics tyConHasGenerics ) where @@ -338,9 +334,6 @@ mkSynTyCon name kind tyvars rhs argvrcs synTyConDefn = rhs, argVrcs = argvrcs } - -setTyConName tc name = tc {tyConName = name, tyConUnique = nameUnique name} - \end{code} \begin{code} @@ -357,12 +350,14 @@ isUnLiftedTyCon (PrimTyCon {isUnLifted = is_unlifted}) = is_unlifted isUnLiftedTyCon (TupleTyCon {tyConBoxed = boxity}) = not (isBoxed boxity) isUnLiftedTyCon _ = False +#ifdef UNUSED -- isBoxedTyCon should not be applied to SynTyCon, nor KindCon isBoxedTyCon :: TyCon -> Bool isBoxedTyCon (AlgTyCon {}) = True isBoxedTyCon (FunTyCon {}) = True isBoxedTyCon (TupleTyCon {tyConBoxed = boxity}) = isBoxed boxity isBoxedTyCon (PrimTyCon {primTyConRep = rep}) = isFollowableRep rep +#endif -- isAlgTyCon returns True for both @data@ and @newtype@ isAlgTyCon :: TyCon -> Bool @@ -570,28 +565,3 @@ instance Outputable TyCon where instance NamedThing TyCon where getName = tyConName \end{code} - - -%************************************************************************ -%* * -\subsection{Kind constructors} -%* * -%************************************************************************ - -@matchesTyCon tc1 tc2@ checks whether an appliation -(tc1 t1..tn) matches (tc2 t1..tn). By "matches" we basically mean "equals", -except that at the kind level tc2 might have more boxity info than tc1. - -\begin{code} -matchesTyCon :: TyCon -- Expected (e.g. arg type of function) - -> TyCon -- Inferred (e.g. type of actual arg to function) - -> Bool - -matchesTyCon tc1 tc2 = uniq1 == uniq2 || uniq1 == anyBoxConKey - where - uniq1 = tyConUnique tc1 - uniq2 = tyConUnique tc2 -\end{code} - - -