Skip to content
Snippets Groups Projects
Commit 13f7bc6e authored by sven.panne@aedion.de's avatar sven.panne@aedion.de
Browse files

[project @ 2000-05-28 23:21:02 by panne]

Prefix litlits with "__litlit" in interface files.
*please merge*
parent 1d78b480
No related branches found
No related tags found
No related merge requests found
...@@ -249,13 +249,14 @@ litTag (MachLitLit _ _) = ILIT(10) ...@@ -249,13 +249,14 @@ litTag (MachLitLit _ _) = ILIT(10)
pprLit lit pprLit lit
= getPprStyle $ \ sty -> = getPprStyle $ \ sty ->
let let
code_style = codeStyle sty code_style = codeStyle sty
iface_style = ifaceStyle sty
in in
case lit of case lit of
MachChar ch | code_style -> hcat [ptext SLIT("(C_)"), char '\'', MachChar ch | code_style -> hcat [ptext SLIT("(C_)"), char '\'',
text (charToC ch), char '\''] text (charToC ch), char '\'']
| ifaceStyle sty -> char '\'' <> text (charToEasyHaskell ch) <> char '\'' | iface_style -> char '\'' <> text (charToEasyHaskell ch) <> char '\''
| otherwise -> text ['\'', ch, '\''] | otherwise -> text ['\'', ch, '\'']
MachStr s | code_style -> pprFSInCStyle s MachStr s | code_style -> pprFSInCStyle s
| otherwise -> pprFSAsString s | otherwise -> pprFSAsString s
...@@ -277,16 +278,17 @@ pprLit lit ...@@ -277,16 +278,17 @@ pprLit lit
MachFloat f | code_style -> ptext SLIT("(StgFloat)") <> rational f MachFloat f | code_style -> ptext SLIT("(StgFloat)") <> rational f
| otherwise -> ptext SLIT("__float") <+> rational f | otherwise -> ptext SLIT("__float") <+> rational f
MachDouble d | ifaceStyle sty && d < 0 -> parens (rational d) MachDouble d | iface_style && d < 0 -> parens (rational d)
| otherwise -> rational d | otherwise -> rational d
MachAddr p | code_style -> ptext SLIT("(void*)") <> integer p MachAddr p | code_style -> ptext SLIT("(void*)") <> integer p
| otherwise -> ptext SLIT("__addr") <+> integer p | otherwise -> ptext SLIT("__addr") <+> integer p
MachLitLit s ty | code_style -> ptext s MachLitLit s ty | code_style -> ptext s
| otherwise -> parens (hsep [ptext SLIT("__litlit"), | iface_style -> ptext SLIT("__litlit") <+> pprFSAsString s
pprFSAsString s, | otherwise -> parens (hsep [ptext SLIT("__litlit"),
pprParendType ty]) pprFSAsString s,
pprParendType ty])
pprIntVal :: Integer -> SDoc pprIntVal :: Integer -> SDoc
-- Print negative integers with parens to be sure it's unambiguous -- Print negative integers with parens to be sure it's unambiguous
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment