[Haskell-cafe] hugs type inference
maeder at tzi.de
Thu Oct 27 17:02:48 EDT 2005
Hugs leaves an odd context when showing the type of the following
expression. Is this a bug or just a harmless flaw?
Hugs.Base> :t toRational 1 / 2
toRational 1 / 2 :: Real a => Ratio Integer
Prelude> :t toRational 1 / 2
Warning: Defaulting the following constraint(s) to type `Integer'
`Real a' arising from use of `toRational' at
In the first argument of `(/)', namely `toRational 1'
toRational 1 / 2 :: Rational
More information about the Haskell-Cafe