[Haskell-beginners] How do I declare a set?

Patrick Mylund Nielsen haskell at patrickmylund.com
Fri Feb 22 12:12:29 CET 2013


It is implemented in GHC HEAD:
http://hackage.haskell.org/trac/ghc/wiki/OverloadedLists


On Fri, Feb 22, 2013 at 2:29 AM, David McBride <toad3k at gmail.com> wrote:

> At the moment, no.  There has been a small push toward an OverloadedLists
> extension, which would allow you to use list syntax for anything that has a
> fromList (there would probably be an IsList class similar to the IsString
> class).  I'm not sure where that has gone.  I know there were several
> competing implementations.
>
>
> On Thu, Feb 21, 2013 at 6:43 PM, Heinrich Ody <heinrich.ody at gmail.com>wrote:
>
>> Hi,
>>
>> with [1,2] I can declare a list. Is there a similar notation for sets?
>> Currently the only way I know is 'Set.fromList [1,2]' which is unhandy...
>>
>> Regards,
>> Heinrich
>>
>> _______________________________________________
>> Beginners mailing list
>> Beginners at haskell.org
>> http://www.haskell.org/mailman/listinfo/beginners
>>
>
>
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://www.haskell.org/mailman/listinfo/beginners
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20130222/f314131f/attachment.htm>


More information about the Beginners mailing list