
#10246: Literal Pattern match loses order -------------------------------------+------------------------------------- Reporter: nomeata | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by nomeata): * cc: rwbarton, simonmar (added) Comment: Currently, the above code will produce {{{ ghc-stage2: panic! (the 'impossible' happened) (GHC version 7.11.20150403 for x86_64-unknown-linux): ASSERT failed! file compiler/basicTypes/Literal.hs line 220 18446744073709551616 }}} Maybe that is a hint as to where this needs to be fixed? Maybe {{{ mkMachInt :: DynFlags -> Integer -> Literal mkMachInt dflags x = ASSERT2( inIntRange dflags x, integer x ) MachInt x }}} is where the clamping to the range of the machine integers should happen? Can we always deduce that from the `dflags`? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10246#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler