[GHC] #9240: "read . show ≡ id" not satisfied by Data.Fixed
GHC
ghc-devs at haskell.org
Thu Jun 26 08:43:59 UTC 2014
#9240: "read . show ≡ id" not satisfied by Data.Fixed
------------------------------------+-------------------------------------
Reporter: hvr | Owner:
Type: bug | Status: new
Priority: normal | Milestone: 7.10.1
Component: libraries/base | Version: 7.2.1
Keywords: | Operating System: Unknown/Multiple
Architecture: Unknown/Multiple | Type of failure: None/Unknown
Difficulty: Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: #9213 |
------------------------------------+-------------------------------------
As pointed out in #9213, the desired property "read . show ≡ id" is not
satisfied for all resolutions. For instance, consider the following
example:
{{{
> data B7
> instance HasResolution B7 where resolution _ = 128
> 1.070 :: Fixed B7
1.062
> 1.062 :: Fixed B7
1.054
> read "1.070" :: Fixed B7
1.062
> read "1.062" :: Fixed B7
1.054
}}}
This behaviour can be reproduced all the way back to GHC 7.2.1
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9240>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list