Send Beginners mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."
Today's Topics:
1. default(Int) (Imants Cekusins)
2. Re: default(Int) (Kim-Ee Yeoh)
----------------------------------------------------------------------
Message: 1
Date: Thu, 16 Jun 2016 10:04:19 +0200
From: Imants Cekusins <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
beginner-level topics related to Haskell <[email protected]>
Subject: [Haskell-beginners] default(Int)
Message-ID:
<cap1qinaetcea5sufoqjsbvef_qgmoahbg7idnbcxb_anega...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://mail.haskell.org/pipermail/beginners/attachments/20160616/2b0d0225/attachment-0001.html>
------------------------------
Message: 2
Date: Thu, 16 Jun 2016 16:42:06 +0700
From: Kim-Ee Yeoh <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
beginner-level topics related to Haskell <[email protected]>
Subject: Re: [Haskell-beginners] default(Int)
Message-ID:
<CAPY+ZdQx287OaNXHQS5n31nZAdKWi5OCDBQksBO=vtYg=h1...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
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 <[email protected]> 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-0001.html>
------------------------------
Subject: Digest Footer
_______________________________________________
Beginners mailing list
[email protected]
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
------------------------------
End of Beginners Digest, Vol 96, Issue 12
*****************************************