projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix retainer profiling
[ghc-hetmet.git]
/
compiler
/
utils
/
Pretty.lhs
diff --git
a/compiler/utils/Pretty.lhs
b/compiler/utils/Pretty.lhs
index
f611d7a
..
51ecf31
100644
(file)
--- a/
compiler/utils/Pretty.lhs
+++ b/
compiler/utils/Pretty.lhs
@@
-87,7
+87,7
@@
Relative to John's original paper, there are the following new features:
It is Really Useful in practice.
2. There is a paragraph-fill combinator, fsep, that's much like sep,
It is Really Useful in practice.
2. There is a paragraph-fill combinator, fsep, that's much like sep,
- only it keeps fitting things on one line until itc can't fit any more.
+ only it keeps fitting things on one line until it can't fit any more.
3. Some random useful extra combinators are provided.
<+> puts its arguments beside each other with a space between them,
3. Some random useful extra combinators are provided.
<+> puts its arguments beside each other with a space between them,
@@
-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,
@@
-446,7
+446,7
@@
int n = text (show n)
integer n = text (show n)
float n = text (show n)
double n = text (show n)
integer n = text (show n)
float n = text (show n)
double n = text (show n)
-rational n = text (show (fromRat n))
+rational n = text (show (fromRat n :: Double))
--rational n = text (show (fromRationalX n)) -- _showRational 30 n)
quotes p = char '`' <> p <> char '\''
--rational n = text (show (fromRationalX n)) -- _showRational 30 n)
quotes p = char '`' <> p <> char '\''
@@
-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