projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Record the original text along with parsed Rationals: fixes #2245
[ghc-hetmet.git]
/
compiler
/
hsSyn
/
HsLit.lhs
diff --git
a/compiler/hsSyn/HsLit.lhs
b/compiler/hsSyn/HsLit.lhs
index
4a565ff
..
def1e35
100644
(file)
--- a/
compiler/hsSyn/HsLit.lhs
+++ b/
compiler/hsSyn/HsLit.lhs
@@
-12,7
+12,8
@@
module HsLit where
#include "HsVersions.h"
import {-# SOURCE #-} HsExpr( SyntaxExpr, pprExpr )
#include "HsVersions.h"
import {-# SOURCE #-} HsExpr( SyntaxExpr, pprExpr )
-import HsTypes (PostTcType)
+import BasicTypes ( FractionalLit(..) )
+import HsTypes ( PostTcType )
import Type ( Type )
import Outputable
import FastString
import Type ( Type )
import Outputable
import FastString
@@
-70,7
+71,7
@@
data HsOverLit id -- An overloaded literal
data OverLitVal
= HsIntegral !Integer -- Integer-looking literals;
data OverLitVal
= HsIntegral !Integer -- Integer-looking literals;
- | HsFractional !Rational -- Frac-looking literals
+ | HsFractional !FractionalLit -- Frac-looking literals
| HsIsString !FastString -- String-looking literals
deriving (Data, Typeable)
| HsIsString !FastString -- String-looking literals
deriving (Data, Typeable)
@@
-155,6
+156,6
@@
instance OutputableBndr id => Outputable (HsOverLit id) where
instance Outputable OverLitVal where
ppr (HsIntegral i) = integer i
instance Outputable OverLitVal where
ppr (HsIntegral i) = integer i
- ppr (HsFractional f) = rational f
+ ppr (HsFractional f) = text (fl_text f)
ppr (HsIsString s) = pprHsString s
\end{code}
ppr (HsIsString s) = pprHsString s
\end{code}