[Haskell-beginners] Why isn't :t (1+1) Integer
Lai Boon Hui
laiboonh at gmail.com
Thu Sep 29 23:48:32 UTC 2016
Hi,
i read that the default type for Num is Integer.
If we specify a type for one of the arguments:
:t (1 + 1::Double) is Double
If we don't, i expect the default type for Num to come into play:
However :t (1 + 1) is Num a => a
Why is that so?
--
Best Regards,
Boon Hui
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20160930/a8b18910/attachment.html>
More information about the Beginners
mailing list