[Haskell-beginners] default(Int)

Kim-Ee Yeoh ky3 at atamo.com
Thu Jun 16 09:42:06 UTC 2016


It is true that ambiguous types cause time-wasting frustration for many a
beginner.

The link that Imants gave helps clarify matters:

https://www.haskell.org/tutorial/numbers.html

Even better is the link to the Haskell report given at the end:

https://www.haskell.org/onlinereport/decls.html#default-decls

On Thursday, June 16, 2016, Imants Cekusins <imantc at gmail.com> wrote:

> default(Int)
>
> allows to use integers anywhere in this module without specifying their
> ambiguous type each time, like this: (3::Int)
>
> https://www.haskell.org/tutorial/numbers.html
> section 10.4
>
> some other default types may be specified too
> somehow I was not aware of this
>


-- 
-- Kim-Ee
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20160616/21902372/attachment.html>


More information about the Beginners mailing list