\begin{code}
module BasicTypes(
- Version,
+ Version, bumpVersion, initialVersion, bogusVersion,
Arity,
TopLevelFlag(..), isTopLevel, isNotTopLevel,
- OccInfo(..), seqOccInfo, isFragileOccInfo, isLoopBreaker,
+ Boxity(..), isBoxed, tupleParens,
+
+ OccInfo(..), seqOccInfo, isFragileOcc, isDeadOcc, isLoopBreaker,
+
InsideLam, insideLam, notInsideLam,
OneBranch, oneBranch, notOneBranch
\begin{code}
type Version = Int
+
+bogusVersion :: Version -- Shouldn't look at these
+bogusVersion = error "bogusVersion"
+
+bumpVersion :: Version -> Version
+bumpVersion v = v+1
+
+initialVersion :: Version
+initialVersion = 1
\end{code}
%************************************************************************
%* *
+\subsection[Top-level/local]{Top-level/not-top level flag}
+%* *
+%************************************************************************
+
+\begin{code}
+data Boxity
+ = Boxed
+ | Unboxed
+ deriving( Eq )
+
+isBoxed :: Boxity -> Bool
+isBoxed Boxed = True
+isBoxed Unboxed = False
+
+tupleParens :: Boxity -> SDoc -> SDoc
+tupleParens Boxed p = parens p
+tupleParens Unboxed p = ptext SLIT("(#") <+> p <+> ptext SLIT("#)")
+\end{code}
+
+
+%************************************************************************
+%* *
\subsection[Recursive/Non-Recursive]{Recursive/Non-Recursive flag}
%* *
%************************************************************************
isLoopBreaker IAmALoopBreaker = True
isLoopBreaker other = False
-isFragileOccInfo :: OccInfo -> Bool
-isFragileOccInfo (OneOcc _ _) = True
-isFragileOccInfo other = False
+isDeadOcc :: OccInfo -> Bool
+isDeadOcc IAmDead = True
+isDeadOcc other = False
+
+isFragileOcc :: OccInfo -> Bool
+isFragileOcc (OneOcc _ _) = True
+isFragileOcc other = False
\end{code}
\begin{code}