summaryrefslogtreecommitdiff
path: root/compiler/javaGen
diff options
context:
space:
mode:
authorsimonpj@microsoft.com <unknown>2008-05-06 10:25:51 +0000
committersimonpj@microsoft.com <unknown>2008-05-06 10:25:51 +0000
commitecdaf6bc29d23bd704df8c65442ee08032a585fc (patch)
tree73ebcd573eb5e273caae6fdfe75a1ca4aba2c2a1 /compiler/javaGen
parent63a69b6790c0df41533c572bb53bc048efd48ff9 (diff)
downloadhaskell-ecdaf6bc29d23bd704df8c65442ee08032a585fc.tar.gz
Fix Trac #2246; overhaul handling of overloaded literals
The real work of fixing Trac #2246 is to use shortCutLit in MatchLit.dsOverLit, so that type information discovered late in the day by the type checker can still be exploited during desugaring. However, as usual I found myself doing some refactoring along the way, to tidy up the handling of overloaded literals. The main change is to split HsOverLit into a record, which in turn uses a sum type for the three variants. This makes the code significantly more modular. data HsOverLit id = OverLit { ol_val :: OverLitVal, ol_rebindable :: Bool, -- True <=> rebindable syntax -- False <=> standard syntax ol_witness :: SyntaxExpr id, -- Note [Overloaded literal witnesses] ol_type :: PostTcType } data OverLitVal = HsIntegral !Integer -- Integer-looking literals; | HsFractional !Rational -- Frac-looking literals | HsIsString !FastString -- String-looking literals
Diffstat (limited to 'compiler/javaGen')
0 files changed, 0 insertions, 0 deletions