• Ryan Scott's avatar
    Fix #15502 by not casting to Int during TH conversion · 7a3cda53
    Ryan Scott authored
    When turning an `IntegerL` to an `IntegralLit` during TH
    conversion, we were stupidly casting an `Integer` to an `Int` in
    order to determine how it should be pretty-printed. Unsurprisingly,
    this causes problems when the `Integer` doesn't lie within the bounds
    of an `Int`, as demonstrated in #15502.
    The fix is simple: don't cast to an `Int`.
    Test Plan: make test TEST=T15502
    Reviewers: bgamari, simonpj
    Reviewed By: simonpj
    Subscribers: simonpj, rwbarton, carter
    GHC Trac Issues: #15502
    Differential Revision: https://phabricator.haskell.org/D5089
all.T 19.1 KB