summaryrefslogtreecommitdiff
path: root/compiler/main
diff options
context:
space:
mode:
authorAustin Seipp <aseipp@pobox.com>2013-08-28 17:14:06 -0500
committerAustin Seipp <aseipp@pobox.com>2013-08-28 20:15:47 -0500
commita6be6f1bd30c1476718392a259cfccf082d0da4d (patch)
treefd63a4d6b879bc94b23bc1b2721365cf0a415899 /compiler/main
parent9e02b0260ef5c6571b3fc1482401fd9668e2e507 (diff)
downloadhaskell-a6be6f1bd30c1476718392a259cfccf082d0da4d.tar.gz
Implement -XNumDecimals (#7266)
Under -XNumDecimals, it's possible to specify an integer literal using compact "floating point" syntax for any floating literal constant which also happens to be an integer. This lets us write 1.2e6 :: Integer instead of: 1200000 :: Integer This also makes some amendments to the users guide. Authored-by: Shachaf Ben-Kiki <shachaf@gmail.com> Signed-off-by: Austin Seipp <aseipp@pobox.com>
Diffstat (limited to 'compiler/main')
-rw-r--r--compiler/main/DynFlags.hs2
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs
index 849d8a418c..4d19519845 100644
--- a/compiler/main/DynFlags.hs
+++ b/compiler/main/DynFlags.hs
@@ -500,6 +500,7 @@ data ExtensionFlag
| Opt_TypeFamilies
| Opt_OverloadedStrings
| Opt_OverloadedLists
+ | Opt_NumDecimals
| Opt_DisambiguateRecordFields
| Opt_RecordWildCards
| Opt_RecordPuns
@@ -2677,6 +2678,7 @@ xFlags = [
deprecatedForExtension "NamedFieldPuns" ),
( "DisambiguateRecordFields", Opt_DisambiguateRecordFields, nop ),
( "OverloadedStrings", Opt_OverloadedStrings, nop ),
+ ( "NumDecimals", Opt_NumDecimals, nop),
( "OverloadedLists", Opt_OverloadedLists, nop),
( "GADTs", Opt_GADTs, nop ),
( "GADTSyntax", Opt_GADTSyntax, nop ),