#15502: -ddump-splices truncates Integer literals to Int literals -------------------------------------+------------------------------------- Reporter: ChaiTRex | Owner: (none) Type: bug | Status: patch Priority: high | Milestone: 8.6.1 Component: Compiler | Version: 8.4.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D5089 Wiki Page: | -------------------------------------+------------------------------------- Comment (by Krzysztof Gogolewski <krz.gogolewski@…>): In [changeset:"7a3cda534d1447c813aa37cdd86e20b8d782cb02/ghc" 7a3cda53/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="7a3cda534d1447c813aa37cdd86e20b8d782cb02" Fix #15502 by not casting to Int during TH conversion Summary: 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 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15502#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler