[Haskell-cafe] hugs type inference

Christian Maeder maeder at tzi.de
Thu Oct 27 17:02:48 EDT 2005


Hi,

Hugs leaves an odd context when showing the type of the following 
expression. Is this a bug or just a harmless flaw?

Christian

Hugs.Base> :t toRational 1 / 2
toRational 1 / 2 :: Real a => Ratio Integer


ghci yields:
Prelude> :t toRational 1 / 2

<interactive>:1:0:
     Warning: Defaulting the following constraint(s) to type `Integer'
              `Real a' arising from use of `toRational' at 
<interactive>:1:0-9
              In the first argument of `(/)', namely `toRational 1'
toRational 1 / 2 :: Rational



More information about the Haskell-Cafe mailing list