id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc,os,architecture,failure,difficulty,testcase,blockedby,blocking,related
7266,Allow fractional-looking integer literals,shachaf,,"Haskell 2010 (2.5, 6.4.1) specifies that there are integer literals and floating literals, which are of types `(Num a) => a` and `(Fractional a) => a` respectively. This is mostly reasonable, because a `Rational` in general can't be converted to an arbitrary `Num` instance.

However, there are many specific cases where specifying an integer with compact ""floating literal"" syntax is reasonable (e.g. `1.2e6` instead of `1200000`). It's possible to do that for any floating literal constant which also happens to be an integer.

Several people have asked for that behavior. Attached is a patch for a proposed extension, `NumDecimals`, that implements it.

Note on #2245: The current fix won't work on converted floating literals, because it involves a special case for `FractionalLit` (the right thing to do is probably to generalize that solution, but doing that properly might be complicated). So with the extension enabled, `1e400` would be pretty-printed as an integer (just like 0400 is pretty-printed). Unlike the example in #2245, though, no information is lost -- floating literals would just be printed in integer form.",feature request,new,high,7.8.1,Compiler,7.6.1,,,daniel@… hackage.haskell.org@…,Unknown/Multiple,Unknown/Multiple,None/Unknown,Unknown,,,,2245
