[GHC] #10011: The Data instance for Ratio violates internal invariants.
GHC
ghc-devs at haskell.org
Fri Jan 23 00:13:47 UTC 2015
#10011: The Data instance for Ratio violates internal invariants.
-------------------------------------+-------------------------------------
Reporter: ekmett | Owner:
Type: bug | Status: new
Priority: normal | Milestone: 7.10.1
Component: Core Libraries | Version: 7.10.1-rc1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Incorrect result | Unknown/Multiple
at runtime | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Revisions: Phab:D625
-------------------------------------+-------------------------------------
Comment (by ekmett):
This work scoped in this ticket is done, but you are right, we should
definitely add a regression test to ensure this doesn't backslide in the
future.
Along the way we found a much less critical, but related issue (ok,
really, feature request), which I'll file a separate ticket for -- with an
eye towards fixing it on a longer time horizon:
I'd eventually like to fix up the "virtual" data constructor we talk about
in the Data instance to use `(%)`, since we're using a virtual constructor
here, and that would let `gshow` and the like do the right thing, but when
we tried that as part of this patch, the fact that `dataToExpQ` currently
filters out things that are illegal constructors caused a test failure.
Fixing _that_ is a big enough issue to punt to 7.12. Fixing that right
might also let us fix things like dataToExpQ for things like Maps, Sets,
and other containers that also have to use the virtual constructor model
to preserve internal invariants, which would be a pretty big boon to heavy
users of template haskell.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10011#comment:11>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list