- = HsChar Char -- characters
- | HsCharPrim Char -- unboxed char literals
- | HsString FAST_STRING -- strings
- | HsStringPrim FAST_STRING -- packed string
-
- | HsInt Integer -- integer-looking literals
- | HsFrac Rational -- frac-looking literals
- -- Up through dict-simplification, HsInt and HsFrac simply
- -- mean the literal was integral- or fractional-looking; i.e.,
- -- whether it had an explicit decimal-point in it. *After*
- -- dict-simplification, they mean (boxed) "Integer" and
- -- "Rational" [Ratio Integer], respectively.
-
- -- Dict-simplification tries to replace such lits w/ more
- -- specific ones, using the unboxed variants that follow...
- | HsIntPrim Integer -- unboxed Int literals
- | HsFloatPrim Rational -- unboxed Float literals
- | HsDoublePrim Rational -- unboxed Double literals
-
- | HsLitLit FAST_STRING -- to pass ``literal literals'' through to C
- -- also: "overloaded" type; but
- -- must resolve to boxed-primitive!
- -- (WDP 94/10)
-\end{code}
+ = HsChar Int -- Character
+ | HsCharPrim Int -- Unboxed character
+ | HsString FAST_STRING -- String
+ | HsStringPrim FAST_STRING -- Packed string
+ | HsInt Integer -- Genuinely an Int; arises from TcGenDeriv,
+ -- and from TRANSLATION
+ | HsIntPrim Integer -- Unboxed Int
+ | HsInteger Integer -- Genuinely an integer; arises only from TRANSLATION
+ | HsRat Rational Type -- Genuinely a rational; arises only from TRANSLATION
+ | HsFloatPrim Rational -- Unboxed Float
+ | HsDoublePrim Rational -- Unboxed Double
+ | HsLitLit FAST_STRING Type -- to pass ``literal literals'' through to C
+ -- also: "overloaded" type; but
+ -- must resolve to boxed-primitive!
+ -- The Type in HsLitLit is needed when desuaring;
+ -- before the typechecker it's just an error value
+ deriving( Eq )