#2036: Show for Double and Float doesn't use parenthesis for negative zero.
---------------------------------+------------------------------------------
Reporter: clanehin | Owner:
Type: bug | Status: new
Priority: normal | Milestone: 6.10 branch
Component: libraries/haskell98 | Version: 6.6.1
Severity: minor | Resolution:
Keywords: | Difficulty: Unknown
Testcase: | Architecture: Multiple
Os: Multiple |
---------------------------------+------------------------------------------
Changes (by igloo):
* cc: [EMAIL PROTECTED] (added)
* difficulty: => Unknown
* milestone: => 6.10 branch
Comment:
Thanks for the report.
According to http://haskell.org/onlinereport/standard-prelude.html the
Show instance for `Double` should be
{{{
instance Show Double where
showsPrec p = showFloat
}}}
i.e. it ignores `p`, so even `Just (-3 :: Double)` shouldn't have parens
as far as I can see. I think this is just a bug in the Haskell report,
though; CCing Malcolm.
Either way, we should certainly be consistent in the negative zero case!
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2036#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs