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. Re: why is there no typeclass common to all containers?
(Tony Morris)
----------------------------------------------------------------------
Message: 1
Date: Wed, 1 Jun 2016 15:14:38 +1000
From: Tony Morris <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
beginner-level topics related to Haskell <[email protected]>
Subject: Re: [Haskell-beginners] why is there no typeclass common to
all containers?
Message-ID:
<cajf6usij9fpbd-ycd3_r+1y8nt8dnetenngwxkz2rr5csji...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
Map and Set are not.
On 01/06/2016 8:57 AM, "Jeffrey Brown" <[email protected]> wrote:
> In Haskell typeclasses are based on what you want to do with something.
> If, for instance, you want to be able to map over a container, you can make
> it an instance of class Functor -- which all the standard containers (List,
> Map, Set, Tree, Maybe ...) already are.
>
> On Tue, May 31, 2016 at 3:26 PM, Silent Leaf <[email protected]>
> wrote:
>
>> In fact it all comes down to trying to add partially a feature absent
>> from the Haskell language, which is the ability to distinguish values both
>> on name *and* on type --thus allowing two variables of the same name if
>> they have different types.
>> Honestly i don't see the drawback of that name system, but i guess there
>> must be one otherwise it'd have been chosen by default instead of the
>> typeblind current name system.
>>
>>
>> Le mercredi 1 juin 2016, Silent Leaf <[email protected]> a ?crit :
>> > All in the title. I haven't used them much, but I saw Map or Vector
>> types were forcing the user to use qualified functions unless you want
>> nameclash with the more basic, typically list-oriented functions.
>> > So, why not have a massive, general purpose interface so the type only
>> can separate between containers --which would allow for cross-container
>> polymorphism, i suppose, more easily, even though it's not necessarily the
>> most widespread need.
>> > So, do i miss something? Is there in fact a class of that kind? If so
>> why not?
>> > Thanks in advance! :)
>>
>> _______________________________________________
>> Beginners mailing list
>> [email protected]
>> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
>>
>>
>
>
> --
> Jeffrey Benjamin Brown
>
> _______________________________________________
> Beginners mailing list
> [email protected]
> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://mail.haskell.org/pipermail/beginners/attachments/20160601/e5087fbf/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 2
****************************************