[project @ 1996-03-19 08:58:34 by partain]
[ghc-hetmet.git] / ghc / compiler / utils / Unpretty.lhs
index 2cdf8d4..6b27379 100644 (file)
@@ -1,5 +1,5 @@
 %
-% (c) The GRASP/AQUA Project, Glasgow University, 1992-1995
+% (c) The GRASP/AQUA Project, Glasgow University, 1992-1996
 %
 \section[Unpretty]{Unpretty-printing data type}
 
@@ -8,31 +8,23 @@
 
 module Unpretty (
        Unpretty(..),
-       PprStyle(..),   -- re-exported from Pretty
-       uppNil, uppStr, uppPStr, uppChar, uppInt, uppInteger, --UNUSED: uppDouble,
-       uppSP, uppLbrack, uppRbrack, uppLparen, uppRparen, -- UNUSED: upp'SP,
+
+       uppNil, uppStr, uppPStr, uppChar, uppInt, uppInteger,
+       uppSP, uppLbrack, uppRbrack, uppLparen, uppRparen,
        uppSemi, uppComma, uppEquals,
 
        uppCat, uppBeside, uppBesides, uppAbove, uppAboves,
-       uppNest, uppSep, uppInterleave, uppIntersperse, --UNUSED: uppHang,
+       uppNest, uppSep, uppInterleave, uppIntersperse,
        uppShow,
-#ifdef __GLASGOW_HASKELL__
        uppAppendFile,
-       IF_ATTACK_PRAGMAS(cAppendFile COMMA)
-       IF_ATTACK_PRAGMAS(cInt COMMA)
-#endif
-#ifdef DPH
-       unprettyToStr,
-#endif {- Data Parallel Haskell -}
 
        -- abstract type, to complete the interface...
-       CSeq, GlobalSwitch
+       CSeq
    ) where
 
+CHK_Ubiq() -- debugging consistency check
+
 import CharSeq
-import Outputable
-import Pretty          ( PprStyle(..), Pretty(..), GlobalSwitch )
-import Util
 \end{code}
 
 Same interface as @Pretty@, but doesn't do anything.
@@ -51,14 +43,12 @@ type Unpretty = CSeq
 \begin{code}
 uppNil         :: Unpretty
 uppSP, uppLbrack, uppRbrack, uppLparen, uppRparen, uppSemi, uppComma, uppEquals :: Unpretty
---UNUSED: upp'SP :: Unpretty
 
 uppStr         :: [Char] -> Unpretty
 uppPStr                :: FAST_STRING -> Unpretty
 uppChar                :: Char -> Unpretty
 uppInt         :: Int -> Unpretty
 uppInteger     :: Integer -> Unpretty
---UNUSED:uppDouble     :: Double -> Unpretty
 
 uppBeside      :: Unpretty -> Unpretty -> Unpretty
 uppBesides     :: [Unpretty] -> Unpretty
@@ -71,14 +61,11 @@ uppAboves   :: [Unpretty] -> Unpretty
 uppInterleave  :: Unpretty -> [Unpretty] -> Unpretty
 uppIntersperse :: Unpretty -> [Unpretty] -> Unpretty   -- no spaces between
 uppSep         :: [Unpretty] -> Unpretty
---UNUSED:uppHang               :: Unpretty -> Int -> Unpretty -> Unpretty
 uppNest                :: Int -> Unpretty -> Unpretty
 
 uppShow                :: Int -> Unpretty -> [Char]
 
-#ifdef __GLASGOW_HASKELL__
 uppAppendFile  :: _FILE -> Int -> Unpretty -> PrimIO ()
-#endif
 \end{code}
 
 %************************************************
@@ -90,9 +77,7 @@ uppAppendFile :: _FILE -> Int -> Unpretty -> PrimIO ()
 \begin{code}
 uppShow _ p    = cShow p
 
-#ifdef __GLASGOW_HASKELL__
 uppAppendFile f _ p = cAppendFile f p
-#endif
 
 uppNil         = cNil
 uppStr s       = cStr s
@@ -101,10 +86,8 @@ uppChar c   = cCh c
 uppInt n       = cInt n
 
 uppInteger n   = cStr (show n)
---UNUSED:uppDouble  n  = cStr (show n)
 
 uppSP          = cCh ' '
---UNUSED:upp'SP                = cStr  ", "
 uppLbrack      = cCh '['
 uppRbrack      = cCh ']'
 uppLparen      = cCh '('
@@ -154,17 +137,6 @@ uppAboves [p]       = p
 uppAboves (p:ps) = p `cAppend` (cCh '\n') `cAppend` (uppAboves ps)
 
 uppNest n p = p
-\end{code}
-
-\begin{code}
---UNUSED: uppHang p1 n p2 = ppBesideSP p1 p2
 
 uppSep ps = uppBesides ps
 \end{code}
-
-\begin{code}
-#ifdef DPH
-unprettyToStr:: Unpretty -> String
-unprettyToStr thing = uppShow 80 thing
-#endif {- Data Parallel Haskell -}
-\end{code}