X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FbasicTypes%2FBasicTypes.lhs;h=022a8fc3b37a04d8c15de7af6a74ebe28872967b;hb=12ec40c5c2b51e826477c557922297f105a41fdb;hp=41a5fa55bd4ed8e15cef7739deb7a77e8e91d998;hpb=215ce9f15215399ce30ae55c9521087847d78646;p=ghc-hetmet.git diff --git a/compiler/basicTypes/BasicTypes.lhs b/compiler/basicTypes/BasicTypes.lhs index 41a5fa5..022a8fc 100644 --- a/compiler/basicTypes/BasicTypes.lhs +++ b/compiler/basicTypes/BasicTypes.lhs @@ -21,7 +21,7 @@ module BasicTypes( Arity, - FunctionOrData(..), + FunctionOrData(..), WarningTxt(..), @@ -57,6 +57,8 @@ module BasicTypes( HsBang(..), isBanged, isMarkedUnboxed, StrictnessMark(..), isMarkedStrict, + DefMethSpec(..), + CompilerPhase, Activation(..), isActive, isNeverActive, isAlwaysActive, isEarlyActive, RuleMatchInfo(..), isConLike, isFunLike, @@ -522,7 +524,7 @@ instance Show OccInfo where %************************************************************************ %* * -\subsection{Strictness indication} + Strictness indication %* * %************************************************************************ @@ -575,6 +577,28 @@ isMarkedStrict _ = True -- All others are strict %************************************************************************ %* * + Default method specfication +%* * +%************************************************************************ + +The DefMethSpec enumeration just indicates what sort of default method +is used for a class. It is generated from source code, and present in +interface files; it is converted to Class.DefMeth before begin put in a +Class object. + +\begin{code} +data DefMethSpec = NoDM -- No default method + | VanillaDM -- Default method given with polymorphic code + | GenericDM -- Default method given with generic code + +instance Outputable DefMethSpec where + ppr NoDM = empty + ppr VanillaDM = ptext (sLit "{- Has default method -}") + ppr GenericDM = ptext (sLit "{- Has generic default method -}") +\end{code} + +%************************************************************************ +%* * \subsection{Success flag} %* * %************************************************************************ @@ -626,9 +650,16 @@ data InlinePragma -- Note [InlinePragma] = InlinePragma { inl_inline :: Bool -- True <=> INLINE, -- False <=> no pragma at all, or NOINLINE + , inl_sat :: Maybe Arity -- Just n <=> Inline only when applied to n -- explicit (non-type, non-dictionary) args + -- That is, inl_sat describes the number of *source-code* + -- arguments the thing must be applied to. We add on the + -- number of implicit, dictionary arguments when making + -- the InlineRule, and don't look at inl_sat further + , inl_act :: Activation -- Says during which phases inlining is allowed + , inl_rule :: RuleMatchInfo -- Should the function be treated like a constructor? } deriving( Eq, Data, Typeable ) \end{code}