X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Futils%2FPretty.lhs;h=59739981505ade8de1513489da12a82e5cb4d94a;hb=e1ddf51abb3a89392cc9da9a36b74f0d69f9a36b;hp=0fc817f288a79e260d63952c27b6861a2b0b1084;hpb=2d52ee06786e5caf0c2d65a4b4bb7c45c6493190;p=ghc-hetmet.git diff --git a/compiler/utils/Pretty.lhs b/compiler/utils/Pretty.lhs index 0fc817f..5973998 100644 --- a/compiler/utils/Pretty.lhs +++ b/compiler/utils/Pretty.lhs @@ -162,7 +162,7 @@ module Pretty ( int, integer, float, double, rational, parens, brackets, braces, quotes, doubleQuotes, semi, comma, colon, space, equals, - lparen, rparen, lbrack, rbrack, lbrace, rbrace, + lparen, rparen, lbrack, rbrack, lbrace, rbrace, cparen, (<>), (<+>), hcat, hsep, ($$), ($+$), vcat, @@ -455,6 +455,8 @@ parens p = char '(' <> p <> char ')' brackets p = char '[' <> p <> char ']' braces p = char '{' <> p <> char '}' +cparen True = parens +cparen False = id hcat = foldr (<>) empty hsep = foldr (<+>) empty @@ -1022,11 +1024,7 @@ printDoc mode hdl doc -- some versions of hPutBuf will barf if the length is zero hPutLitString handle a# 0# = return () hPutLitString handle a# l# -#if __GLASGOW_HASKELL__ < 411 - = hPutBuf handle (A# a#) (I# l#) -#else = hPutBuf handle (Ptr a#) (I# l#) -#endif -- Printing output in LeftMode is performance critical: it's used when -- dumping C and assembly output, so we allow ourselves a few dirty @@ -1066,9 +1064,4 @@ layLeft b (TextBeside s sl p) = put b s >> layLeft b p put b (Str s) = bPutStr b s put b (PStr s) = bPutFS b s put b (LStr s l) = bPutLitString b s l - -#if __GLASGOW_HASKELL__ < 503 -hPutBuf = hPutBufFull -#endif - \end{code}