projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Split the Id related functions out from Var into Id, document Var and some of Id
[ghc-hetmet.git]
/
compiler
/
basicTypes
/
BasicTypes.lhs
diff --git
a/compiler/basicTypes/BasicTypes.lhs
b/compiler/basicTypes/BasicTypes.lhs
index
f782da3
..
8fcf5ca
100644
(file)
--- a/
compiler/basicTypes/BasicTypes.lhs
+++ b/
compiler/basicTypes/BasicTypes.lhs
@@
-30,6
+30,8
@@
module BasicTypes(
RecFlag(..), isRec, isNonRec, boolToRecFlag,
RecFlag(..), isRec, isNonRec, boolToRecFlag,
+ RuleName,
+
TopLevelFlag(..), isTopLevel, isNotTopLevel,
OverlapFlag(..),
TopLevelFlag(..), isTopLevel, isNotTopLevel,
OverlapFlag(..),
@@
-129,6
+131,15
@@
instance Outputable name => Outputable (IPName name) where
ppr (IPName n) = char '?' <> ppr n -- Ordinary implicit parameters
\end{code}
ppr (IPName n) = char '?' <> ppr n -- Ordinary implicit parameters
\end{code}
+%************************************************************************
+%* *
+ Rules
+%* *
+%************************************************************************
+
+\begin{code}
+type RuleName = FastString
+\end{code}
%************************************************************************
%* *
%************************************************************************
%* *
@@
-372,17
+383,20
@@
the base of the module hierarchy. So it seemed simpler to put the
defn of OccInfo here, safely at the bottom
\begin{code}
defn of OccInfo here, safely at the bottom
\begin{code}
+-- | Identifier occurrence information
data OccInfo
data OccInfo
- = NoOccInfo -- Many occurrences, or unknown
+ = NoOccInfo -- ^ There are many occurrences, or unknown occurences
- | IAmDead -- Marks unused variables. Sometimes useful for
+ | IAmDead -- ^ Marks unused variables. Sometimes useful for
-- lambda and case-bound variables.
-- lambda and case-bound variables.
- | OneOcc -- Occurs exactly once, not inside a rule
+ | OneOcc
!InsideLam
!OneBranch
!InsideLam
!OneBranch
- !InterestingCxt
+ !InterestingCxt -- ^ Occurs exactly once, not inside a rule
+ -- | This identifier breaks a loop of mutually recursive functions. The field
+ -- marks whether it is only a loop breaker due to a reference in a rule
| IAmALoopBreaker -- Note [LoopBreaker OccInfo]
!RulesOnly -- True <=> This is a weak or rules-only loop breaker
-- See OccurAnal Note [Weak loop breakers]
| IAmALoopBreaker -- Note [LoopBreaker OccInfo]
!RulesOnly -- True <=> This is a weak or rules-only loop breaker
-- See OccurAnal Note [Weak loop breakers]