Skip to content

"read . show ≡ id" not satisfied by Data.Fixed

As pointed out in #9231 (closed), 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

Edited by Herbert Valerio Riedel
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information