Răzvan Rotaru | 27 Mar 20:30 2013
Picon

[extension]syntactic sugar for maps

Hi,

I am terribly missing some syntactic sugar for maps (associative data structures) in Haskell. I find myself using them more than any other data structure, and I think there is no big deal in adding some sugar for this to the language. I could not find out whether such an extension is beeing discussed. If not, I would like to propose and extension. Any help and suggestions are very welcome here. Thanks.

Also related to the topic:

1/ Is there a list of proposals for extensions to Haskell that has currently been accepted in the new standard? I have not found one on Haskell' (http://hackage.haskell.org/trac/haskell-prime/query?status=new&status=assigned&status=reopened&group=state), but it looks outdated. No mentions to the new standard!

2/ I have seen somewhere a statement that a new language standard will be published yearly. Didn't happen until now. Is there even a new standard on the way?

Cheers,
Răzvan
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Ivan Lazar Miljenovic | 27 Mar 20:48 2013
Picon

Re: [extension]syntactic sugar for maps

On 28 March 2013 06:30, Răzvan Rotaru <razvan.rotaru <at> gmail.com> wrote:
> Hi,
>
> I am terribly missing some syntactic sugar for maps (associative data
> structures) in Haskell. I find myself using them more than any other data
> structure, and I think there is no big deal in adding some sugar for this to
> the language. I could not find out whether such an extension is beeing
> discussed. If not, I would like to propose and extension. Any help and
> suggestions are very welcome here. Thanks.

What kind of syntactic sugar are you wanting?

>
> Also related to the topic:
>
> 1/ Is there a list of proposals for extensions to Haskell that has currently
> been accepted in the new standard? I have not found one on Haskell'
> (http://hackage.haskell.org/trac/haskell-prime/query?status=new&status=assigned&status=reopened&group=state),
> but it looks outdated. No mentions to the new standard!
>
> 2/ I have seen somewhere a statement that a new language standard will be
> published yearly. Didn't happen until now. Is there even a new standard on
> the way?
>
> Cheers,
> Răzvan
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe <at> haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>

--

-- 
Ivan Lazar Miljenovic
Ivan.Miljenovic <at> gmail.com
http://IvanMiljenovic.wordpress.com

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Răzvan Rotaru | 27 Mar 20:56 2013
Picon

Re: [extension]syntactic sugar for maps

Sorry, I forgot to explain (probably because I'm too used to it). I am referring to a syntax for easy creation of maps. Something equivalent to lists:

to build a list: [ 1, 2, 3]
to build a map; { 1, "one", 2, "two", 3, "three"}

Without it I am always forced to use fromList.

Răzvan



On 27 March 2013 21:48, Ivan Lazar Miljenovic <ivan.miljenovic <at> gmail.com> wrote:
On 28 March 2013 06:30, Răzvan Rotaru <razvan.rotaru <at> gmail.com> wrote:
> Hi,
>
> I am terribly missing some syntactic sugar for maps (associative data
> structures) in Haskell. I find myself using them more than any other data
> structure, and I think there is no big deal in adding some sugar for this to
> the language. I could not find out whether such an extension is beeing
> discussed. If not, I would like to propose and extension. Any help and
> suggestions are very welcome here. Thanks.

What kind of syntactic sugar are you wanting?

>
> Also related to the topic:
>
> 1/ Is there a list of proposals for extensions to Haskell that has currently
> been accepted in the new standard? I have not found one on Haskell'
> (http://hackage.haskell.org/trac/haskell-prime/query?status=new&status=assigned&status=reopened&group=state),
> but it looks outdated. No mentions to the new standard!
>
> 2/ I have seen somewhere a statement that a new language standard will be
> published yearly. Didn't happen until now. Is there even a new standard on
> the way?
>
> Cheers,
> Răzvan
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe <at> haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>



--
Ivan Lazar Miljenovic
Ivan.Miljenovic <at> gmail.com
http://IvanMiljenovic.wordpress.com

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Tikhon Jelvis | 27 Mar 20:54 2013
Picon

Re: [extension]syntactic sugar for maps

I'm genuinely curious as to how you use maps. I've found I use them far less in Haskell than in any other language: I only use them in select circumstances. And most of those uses would not benefit from a mayo literal.

I suspect that many of the uses of map literals are better replaced with something like a record. This has the advantage of being static and more type safe. However, this is only based on my own use cases, so it's hard to generalize.

On Mar 27, 2013 12:32 PM, "Răzvan Rotaru" <razvan.rotaru <at> gmail.com> wrote:
Hi,

I am terribly missing some syntactic sugar for maps (associative data structures) in Haskell. I find myself using them more than any other data structure, and I think there is no big deal in adding some sugar for this to the language. I could not find out whether such an extension is beeing discussed. If not, I would like to propose and extension. Any help and suggestions are very welcome here. Thanks.

Also related to the topic:

1/ Is there a list of proposals for extensions to Haskell that has currently been accepted in the new standard? I have not found one on Haskell' (http://hackage.haskell.org/trac/haskell-prime/query?status=new&status=assigned&status=reopened&group=state), but it looks outdated. No mentions to the new standard!

2/ I have seen somewhere a statement that a new language standard will be published yearly. Didn't happen until now. Is there even a new standard on the way?

Cheers,
Răzvan

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Nicolas Trangez | 27 Mar 20:56 2013

Re: [extension]syntactic sugar for maps

On Wed, 2013-03-27 at 21:30 +0200, Răzvan Rotaru wrote:
> I am terribly missing some syntactic sugar for maps (associative data
> structures) in Haskell. I find myself using them more than any other
> data
> structure, and I think there is no big deal in adding some sugar for
> this
> to the language. I could not find out whether such an extension is
> beeing
> discussed. If not, I would like to propose and extension. Any help and
> suggestions are very welcome here. Thanks.

http://hackage.haskell.org/trac/ghc/wiki/OverloadedLists comes to mind.

Nicolas

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Gmane