[GHC] #10011: The Data instance for Ratio violates internal invariants.
GHC
ghc-devs at haskell.org
Mon Feb 23 14:52:07 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 hvr):
The following was suggested as regression test by Edward:
{{{
>>> :set -XScopedTypeVariables -XTypeOperators -XGADTs
>>> :m + Control.Lens Data.Data.Lens Data.Ratio
>>> let bad = gmapT (\(x :: b) -> case eqT :: Maybe (b :~: Integer) of
Nothing -> x; Just Refl -> x * 2) (1 % 2) :: Rational in bad == numerator
bad % denominator bad
False
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10011#comment:12>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list