- #1
gnome
- 1,041
- 1
Can anybody explain what appear to be discrepancies in the way the following expressions are interpreted by Hugs (Haskell98 mode) ?
Code:
Main> div -6 4
ERROR - Cannot infer instance
*** Instance : Num (b -> a -> a -> a)
*** Expression : div - fromInt 6 4
Main> div (-6) 4
-2
Main> -6 `div` 4
-1
Main> (-6) `div` 4
-2