[GHC] #9231: 7.8 regression in Read instance of Data.Fixed.Pico

GHC ghc-devs at haskell.org
Tue Jun 24 19:45:06 UTC 2014


#9231: 7.8 regression in Read instance of Data.Fixed.Pico
-------------------------------------+------------------------------------
        Reporter:  leonbaum2         |            Owner:
            Type:  bug               |           Status:  merge
        Priority:  highest           |        Milestone:  7.8.3
       Component:  libraries/base    |          Version:  7.8.2
      Resolution:                    |         Keywords:  regression
Operating System:  Unknown/Multiple  |     Architecture:  Unknown/Multiple
 Type of failure:  None/Unknown      |       Difficulty:  Unknown
       Test Case:                    |       Blocked By:
        Blocking:                    |  Related Tickets:
-------------------------------------+------------------------------------

Comment (by hvr):

 Replying to [comment:9 Ashley Yakeley]:
 > Just to clarify, r is not necessarily a power of 10.

 Now that you say it, I had the impression an implicit power-of-10
 assumption was baked into `Data.Fixed`, for instance consider the
 following weird behaviour (can be observed in GHC 7.6 as well):

 {{{
 Prelude> import Data.Fixed
 Prelude Data.Fixed> data B7
 Prelude Data.Fixed> instance HasResolution B7 where resolution _ = 128
 Prelude Data.Fixed> 1.070 :: Fixed B7
 1.062
 Prelude Data.Fixed> 1.062 :: Fixed B7
 1.054
 Prelude Data.Fixed> 1.054 :: Fixed B7
 1.046
 Prelude Data.Fixed> 1.046 :: Fixed B7
 1.039
 }}}

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9231#comment:10>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list