Add support for binary integer literals syntax (re #9224)
ClosedPublic

Authored by hvr on Jun 21 2014, 4:50 AM.

Diff Detail

Repository
rGHC Glasgow Haskell Compiler
Lint
Lint Skipped
Unit
Unit Tests Skipped
hvr updated this revision to Diff 43.Jun 21 2014, 4:50 AM
hvr retitled this revision from to Add support for binary integer literals syntax (re #9224).
hvr updated this object.
hvr edited the test plan for this revision. (Show Details)
hvr added a reviewer: simonpj.
hvr updated this revision to Diff 46.Jun 22 2014, 5:02 AM

Make toggable via new BinaryLiterals pragma (depends on D23)

hvr updated this object.Jun 22 2014, 5:05 AM
hvr edited the test plan for this revision. (Show Details)
hvr added a reviewer: austin.
hvr added a comment.Jun 22 2014, 5:25 AM

Btw, I forgot to update the T4437 test-case which now fails (unsurprisingly) due the newly added language extension token BinaryLiterals.

Actual stdout output differs from expected:
--- /dev/null	2014-06-22 08:57:59.630975069 +0200
+++ ./driver/T4437.run.stdout	2014-06-22 12:22:15.526451149 +0200
@@ -0,0 +1,5 @@
+GHC-only flags: Unexpected flags
+-----
+BinaryLiterals
+-----
+
*** unexpected failure for T4437(normal)
austin requested changes to this revision.Jun 22 2014, 3:25 PM
austin edited edge metadata.

The actual code looks OK, but:

  • No tests.
  • No manual entry!

We will probably want this to be a registered extension in Cabal too. But that isn't a deal-breaking holdup.

This revision now requires changes to proceed.Jun 22 2014, 3:25 PM

I'll also note I find this an acceptable, low cost extension, and it matches with the fact we can already specify numbers of other bases...

simonpj edited edge metadata.Jun 23 2014, 3:16 AM

Fine with me, provided there is a manual entry.

Simon

hvr updated this object.Jun 23 2014, 5:00 AM
hvr edited edge metadata.
hvr updated this revision to Diff 58.Jun 27 2014, 1:29 PM
hvr edited edge metadata.

added testsuite and user-guide entry

austin accepted this revision.Jun 27 2014, 1:36 PM
austin edited edge metadata.

LGTM!

This revision is now accepted and ready to land.Jun 27 2014, 1:36 PM
hvr updated this revision to Diff 59.Jun 27 2014, 1:48 PM
hvr edited edge metadata.

Fix typo in manual, add BinaryLiterals token to ghc-only set, test upper-case 0B

hvr closed this revision.Jun 27 2014, 1:57 PM
hvr updated this revision to Diff 60.

Closed by commit rGHC1c0b5fdc9f2b (authored by @hvr).