
#9231: 7.8 regression in Read instance of Data.Fixed.Pico -------------------------------------+------------------------------------ Reporter: leonbaum2 | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: libraries/base | Version: 7.8.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Comment (by hvr): The parser code seems totally wrong, e.g. consider {{{#!hs convertFixed :: forall a . HasResolution a => Lexeme -> ReadPrec (Fixed a) convertFixed (Number n) | Just (i, f) <- numberToFixed r n = return (fromInteger i + (fromInteger f / (10 ^ r))) where r = resolution (undefined :: Fixed a) convertFixed _ = pfail }}} And note that `resolution` doesn't return an exponent but rather a power of 10. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9231#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler