#include "HsVersions.h"
import Type ( Type )
-import Name ( Name )
-import HsTypes ( PostTcType )
+import HsTypes ( SyntaxName, PostTcType )
import Outputable
+import FastString
import Ratio ( Rational )
\end{code}
data HsLit
= HsChar Int -- Character
| HsCharPrim Int -- Unboxed character
- | HsString FAST_STRING -- String
- | HsStringPrim FAST_STRING -- Packed string
+ | HsString FastString -- String
+ | HsStringPrim FastString -- Packed string
| HsInt Integer -- Genuinely an Int; arises from TcGenDeriv,
-- and from TRANSLATION
| HsIntPrim Integer -- Unboxed Int
| HsRat Rational Type -- Genuinely a rational; arises only from TRANSLATION
| HsFloatPrim Rational -- Unboxed Float
| HsDoublePrim Rational -- Unboxed Double
- | HsLitLit FAST_STRING PostTcType -- to pass ``literal literals'' through to C
+ | HsLitLit FastString PostTcType -- to pass ``literal literals'' through to C
-- also: "overloaded" type; but
-- must resolve to boxed-primitive!
-- The Type in HsLitLit is needed when desuaring;
lit1 == lit2 = False
data HsOverLit -- An overloaded literal
- = HsIntegral Integer Name -- Integer-looking literals;
+ = HsIntegral Integer SyntaxName -- Integer-looking literals;
-- The name is fromInteger
- | HsFractional Rational Name -- Frac-looking literals
+ | HsFractional Rational SyntaxName -- Frac-looking literals
-- The name is fromRational
instance Eq HsOverLit where
ppr (HsFloatPrim f) = rational f <> char '#'
ppr (HsDoublePrim d) = rational d <> text "##"
ppr (HsIntPrim i) = integer i <> char '#'
- ppr (HsLitLit s _) = hcat [text "``", ptext s, text "''"]
+ ppr (HsLitLit s _) = hcat [text "``", ftext s, text "''"]
instance Outputable HsOverLit where
ppr (HsIntegral i _) = integer i