projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix worker/wrapper ids for newtype instances
[ghc-hetmet.git]
/
compiler
/
utils
/
Pretty.lhs
diff --git
a/compiler/utils/Pretty.lhs
b/compiler/utils/Pretty.lhs
index
0fc817f
..
5973998
100644
(file)
--- 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,
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,
(<>), (<+>), hcat, hsep,
($$), ($+$), vcat,
@@
-455,6
+455,8
@@
parens p = char '(' <> p <> char ')'
brackets p = char '[' <> p <> char ']'
braces 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
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#
-- 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#)
= 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
-- 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
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}
\end{code}