projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Implement -fexpose-all-unfoldings, and fix a non-termination bug
[ghc-hetmet.git]
/
compiler
/
basicTypes
/
BasicTypes.lhs
diff --git
a/compiler/basicTypes/BasicTypes.lhs
b/compiler/basicTypes/BasicTypes.lhs
index
9b21399
..
849d507
100644
(file)
--- a/
compiler/basicTypes/BasicTypes.lhs
+++ b/
compiler/basicTypes/BasicTypes.lhs
@@
-42,8
+42,9
@@
module BasicTypes(
TupCon(..), tupleParens,
TupCon(..), tupleParens,
- OccInfo(..), seqOccInfo, isFragileOcc, isOneOcc,
+ OccInfo(..), seqOccInfo, zapFragileOcc, isOneOcc,
isDeadOcc, isLoopBreaker, isNonRuleLoopBreaker, isNoOcc,
isDeadOcc, isLoopBreaker, isNonRuleLoopBreaker, isNoOcc,
+ nonRuleLoopBreaker,
InsideLam, insideLam, notInsideLam,
OneBranch, oneBranch, notOneBranch,
InsideLam, insideLam, notInsideLam,
OneBranch, oneBranch, notOneBranch,
@@
-476,17
+477,20
@@
isNonRuleLoopBreaker :: OccInfo -> Bool
isNonRuleLoopBreaker (IAmALoopBreaker False) = True -- Loop-breaker that breaks a non-rule cycle
isNonRuleLoopBreaker _ = False
isNonRuleLoopBreaker (IAmALoopBreaker False) = True -- Loop-breaker that breaks a non-rule cycle
isNonRuleLoopBreaker _ = False
+nonRuleLoopBreaker :: OccInfo
+nonRuleLoopBreaker = IAmALoopBreaker False
+
isDeadOcc :: OccInfo -> Bool
isDeadOcc IAmDead = True
isDeadOcc _ = False
isOneOcc :: OccInfo -> Bool
isDeadOcc :: OccInfo -> Bool
isDeadOcc IAmDead = True
isDeadOcc _ = False
isOneOcc :: OccInfo -> Bool
-isOneOcc (OneOcc _ _ _) = True
-isOneOcc _ = False
+isOneOcc (OneOcc {}) = True
+isOneOcc _ = False
-isFragileOcc :: OccInfo -> Bool
-isFragileOcc (OneOcc _ _ _) = True
-isFragileOcc _ = False
+zapFragileOcc :: OccInfo -> OccInfo
+zapFragileOcc (OneOcc {}) = NoOccInfo
+zapFragileOcc occ = occ
\end{code}
\begin{code}
\end{code}
\begin{code}