[GHC] #643: div and mod return wrong result

GHC trac at galois.com
Sun Jan 1 15:47:10 EST 2006


#643: div and mod return wrong result
------------------------+---------------------------------------------------
  Reporter:  anonymous  |          Owner:         
      Type:  bug        |         Status:  closed 
  Priority:  normal     |      Milestone:         
 Component:  GHCi       |        Version:  6.4.1  
  Severity:  normal     |     Resolution:  invalid
  Keywords:             |             Os:  MacOS X
Difficulty:  Unknown    |   Architecture:  powerpc
------------------------+---------------------------------------------------
Changes (by Lemmih):

  * resolution:  => invalid
  * status:  new => closed

Comment:

 That's because '-10 `div` 3' is parsed as '- (10 `div` 3)'. Writing '(-10)
 `div` 3' gives the correct result.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/643>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the Glasgow-haskell-bugs mailing list