[project @ 2005-05-04 10:28:07 by ross]
[ghc-hetmet.git] / ghc / compiler / basicTypes / BasicTypes.lhs
index cb08941..b0b3bc1 100644 (file)
@@ -14,30 +14,26 @@ types that
 
 \begin{code}
 module BasicTypes(
-       Version, bumpVersion, initialVersion, bogusVersion,
+       Version, bumpVersion, initialVersion,
 
        Arity, 
        
        DeprecTxt,
 
-       Unused, unused,
-
        Fixity(..), FixityDirection(..),
        defaultFixity, maxPrecedence, 
-       arrowFixity, negateFixity, negatePrecedence,
+       negateFixity,
        compareFixity,
 
        IPName(..), ipNameName, mapIPName,
 
-       NewOrData(..), 
-
        RecFlag(..), isRec, isNonRec, boolToRecFlag,
 
        TopLevelFlag(..), isTopLevel, isNotTopLevel,
 
        Boxity(..), isBoxed, 
 
-       TupCon(..), tupParens, tupleParens,
+       TupCon(..), tupleParens,
 
        OccInfo(..), seqOccInfo, isFragileOcc, isOneOcc, 
        isDeadOcc, isLoopBreaker,
@@ -63,22 +59,6 @@ import Outputable
 
 %************************************************************************
 %*                                                                     *
-\subsection[Unused]{Unused}
-%*                                                                     *
-%************************************************************************
-
-Used as a placeholder in types.
-
-\begin{code}
-type Unused = ()
-
-unused :: Unused
-unused = error "Unused is used!"
-\end{code}
-
-
-%************************************************************************
-%*                                                                     *
 \subsection[Arity]{Arity}
 %*                                                                     *
 %************************************************************************
@@ -97,9 +77,6 @@ type Arity = Int
 \begin{code}
 type Version = Int
 
-bogusVersion :: Version        -- Shouldn't look at these
-bogusVersion = error "bogusVersion"
-
 bumpVersion :: Version -> Version 
 bumpVersion v = v+1
 
@@ -181,9 +158,6 @@ defaultFixity = Fixity maxPrecedence InfixL
 negateFixity :: Fixity
 negateFixity     = Fixity negatePrecedence InfixL      -- Precedence of unary negate is wired in as infixl 6!
 
-arrowFixity :: Fixity  -- Fixity of '->' in types
-arrowFixity = Fixity 0 InfixR
-
 negatePrecedence :: Int
 negatePrecedence = 6
 \end{code}
@@ -217,24 +191,6 @@ compareFixity (Fixity prec1 dir1) (Fixity prec2 dir2)
 
 %************************************************************************
 %*                                                                     *
-\subsection[NewType/DataType]{NewType/DataType flag}
-%*                                                                     *
-%************************************************************************
-
-\begin{code}
-data NewOrData
-  = NewType    -- "newtype Blah ..."
-  | DataType   -- "data Blah ..."
-  deriving( Eq )       -- Needed because Demand derives Eq
-
-instance Outputable NewOrData where
-  ppr NewType  = ptext SLIT("newtype")
-  ppr DataType = ptext SLIT("data")
-\end{code}
-
-
-%************************************************************************
-%*                                                                     *
 \subsection[Top-level/local]{Top-level/not-top level flag}
 %*                                                                     *
 %************************************************************************
@@ -316,9 +272,6 @@ data TupCon = TupCon Boxity Arity
 instance Eq TupCon where
   (TupCon b1 a1) == (TupCon b2 a2) = b1==b2 && a1==a2
    
-tupParens :: TupCon -> SDoc -> SDoc
-tupParens (TupCon b _) p = tupleParens b p
-
 tupleParens :: Boxity -> SDoc -> SDoc
 tupleParens Boxed   p = parens p
 tupleParens Unboxed p = ptext SLIT("(#") <+> p <+> ptext SLIT("#)")
@@ -421,11 +374,11 @@ isFragileOcc other          = False
 instance Outputable OccInfo where
   -- only used for debugging; never parsed.  KSW 1999-07
   ppr NoOccInfo                                  = empty
-  ppr IAmALoopBreaker                            = ptext SLIT("_Kx")
-  ppr IAmDead                                    = ptext SLIT("_Kd")
-  ppr (OneOcc inside_lam one_branch) | inside_lam = ptext SLIT("_Kl")
-                                    | one_branch = ptext SLIT("_Ks")
-                                    | otherwise  = ptext SLIT("_Ks*")
+  ppr IAmALoopBreaker                            = ptext SLIT("LoopBreaker")
+  ppr IAmDead                                    = ptext SLIT("Dead")
+  ppr (OneOcc inside_lam one_branch) | inside_lam = ptext SLIT("OnceInLam")
+                                    | one_branch = ptext SLIT("Once")
+                                    | otherwise  = ptext SLIT("OnceEachBranch")
 
 instance Show OccInfo where
   showsPrec p occ = showsPrecSDoc p (ppr occ)