+litFVs (HsChar c) = returnRn (unitFV charTyCon_name)
+litFVs (HsCharPrim c) = returnRn (unitFV (getName charPrimTyCon))
+litFVs (HsString s) = returnRn (mkFVs [listTyCon_name, charTyCon_name])
+litFVs (HsStringPrim s) = returnRn (unitFV (getName addrPrimTyCon))
+litFVs (HsInt i) = returnRn (unitFV (getName intTyCon))
+litFVs (HsIntPrim i) = returnRn (unitFV (getName intPrimTyCon))
+litFVs (HsFloatPrim f) = returnRn (unitFV (getName floatPrimTyCon))
+litFVs (HsDoublePrim d) = returnRn (unitFV (getName doublePrimTyCon))
+litFVs (HsLitLit l bogus_ty) = lookupOrigName cCallableClass_RDR `thenRn` \ cc ->
+ returnRn (unitFV cc)
+litFVs lit = pprPanic "RnExpr.litFVs" (ppr lit) -- HsInteger and HsRat only appear
+ -- in post-typechecker translations
+
+rnOverLit (HsIntegral i from_integer)
+ = lookupOccRn from_integer `thenRn` \ from_integer' ->
+ (if inIntRange i then
+ returnRn emptyFVs
+ else
+ lookupOrigNames [plusInteger_RDR, timesInteger_RDR]
+ ) `thenRn` \ ns ->
+ returnRn (HsIntegral i from_integer', ns `addOneFV` from_integer')
+
+rnOverLit (HsFractional i n)
+ = lookupOccRn n `thenRn` \ n' ->
+ lookupOrigNames [ratioDataCon_RDR, plusInteger_RDR, timesInteger_RDR] `thenRn` \ ns' ->
+ -- We have to make sure that the Ratio type is imported with
+ -- its constructor, because literals of type Ratio t are
+ -- built with that constructor.
+ -- The Rational type is needed too, but that will come in
+ -- when fractionalClass does.
+ -- The plus/times integer operations may be needed to construct the numerator
+ -- and denominator (see DsUtils.mkIntegerLit)
+ returnRn (HsFractional i n', ns' `addOneFV` n')
+\end{code}