#endif
module Pretty (
- Pretty(..),
#if defined(COMPILING_GHC)
+ SYN_IE(Pretty),
prettyToUn,
+#else
+ Pretty,
#endif
ppNil, ppStr, ppPStr, ppChar, ppInt, ppInteger,
ppFloat, ppDouble,
ppShow, speakNth,
#if defined(COMPILING_GHC)
- ppAppendFile,
+ ppPutStr,
#endif
-- abstract type, to complete the interface...
- PrettyRep(..), CSeq, Delay
-#if defined(COMPILING_GHC)
- , Unpretty(..)
-#endif
+ PrettyRep(..), Delay
) where
#if defined(COMPILING_GHC)
CHK_Ubiq() -- debugging consistency check
+IMPORT_1_3(Ratio)
+IMPORT_1_3(IO)
-import Unpretty ( Unpretty(..) )
+import Unpretty ( SYN_IE(Unpretty) )
+#else
+import Ratio
#endif
import CharSeq
ppShow :: Int -> Pretty -> [Char]
#if defined(COMPILING_GHC)
-ppAppendFile :: _FILE -> Int -> Pretty -> IO ()
+ppPutStr :: Handle -> Int -> Pretty -> IO ()
#endif
\end{code}
MkPrettyRep seq ll emp sl -> cShow seq
#if defined(COMPILING_GHC)
-ppAppendFile f width p
+ppPutStr f width p
= case (p width False) of
- MkPrettyRep seq ll emp sl -> cAppendFile f seq
+ MkPrettyRep seq ll emp sl -> cPutStr f seq
#endif
ppNil width is_vert = MkPrettyRep cNil (MkDelay 0) True (width >= 0)
ppInteger n = ppStr (show n)
ppDouble n = ppStr (show n)
ppFloat n = ppStr (show n)
+
ppRational n = ppStr (show (fromRationalX n)) -- _showRational 30 n)
ppSP = ppChar ' '