Fix for built-in Natural literals desugaring
authorSylvain Henry <hsyl20@gmail.com>
Fri, 6 Jul 2018 15:01:14 +0000 (11:01 -0400)
committerBen Gamari <ben@smart-cactus.org>
Thu, 12 Jul 2018 02:02:00 +0000 (22:02 -0400)
commit31f7d21bae5d75621a4077e2966a80ce30c55d46
treeb1556a0ee1859e825becde62a2bbc69cf97d5867
parent5059edb0fe59581ae52e446d7eca5fd03746ce83
Fix for built-in Natural literals desugaring

The recent patch "Built-in Natural literals in Core"
(https://phabricator.haskell.org/rGHCfe770c211631e7b4c9b0b1e88ef9b6046c6
585ef) introduced a regression when desugaring large numbers.

This patch fixes it and adds a regression test.

Reviewers: hvr, bgamari

Reviewed By: bgamari

Subscribers: rwbarton, thomie, carter

GHC Trac Issues: #15301

Differential Revision: https://phabricator.haskell.org/D4885

(cherry picked from commit 987b5e7fbacd8afd2c8463c16eac28cd68f43155)
libraries/base/GHC/Natural.hs
testsuite/tests/numeric/should_run/T15301.hs [new file with mode: 0644]
testsuite/tests/numeric/should_run/T15301.stdout [new file with mode: 0644]
testsuite/tests/numeric/should_run/all.T