[GHC] #15696: Derived Ord instance for enumerations with more than 8 elements seems to be incorrect
GHC
ghc-devs at haskell.org
Thu Oct 11 10:26:17 UTC 2018
#15696: Derived Ord instance for enumerations with more than 8 elements seems to be
incorrect
-------------------------------------+-------------------------------------
Reporter: mrkkrp | Owner: osa1
Type: bug | Status: patch
Priority: highest | Milestone: 8.6.2
Component: Compiler | Version: 8.6.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Incorrect result | Unknown/Multiple
at runtime | Test Case:
Blocked By: | Blocking:
Related Tickets: #14677, #15155 | Differential Rev(s): Phab:D5196,
Wiki Page: | Phab:D5201
-------------------------------------+-------------------------------------
Comment (by simonpj):
> What's wrong with seeing a literal when floating stuff inwards? Why not
just introduce case/let around it?
Because the float-in pass floats bindings inwards ''towards their use
sites''. If there is no use of the variable bound by a floating binding,
then we should not be floating that binding into that part of the code.
Literals are an extreme case.
> There should be some code somewhere that's supposed to ensure that this
assertion is not triggered, but I can't find it.
It's `FloatIn.sepBindsByDropPoint`.
> Why did simplifier not remove this case expression?
That is indeed a mystery. Is the code you are showing the output of the
simplifier?
Can you give instructions to reproduce (maybe make a `wip/` branch)?
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15696#comment:71>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list