[Haskell-cafe] Applicative do?

Joe Fredette jfredett at gmail.com
Fri Oct 9 13:45:12 EDT 2009


The only issue I would have with such a notation is not being able to  
visually tell the difference between a monadic function (say, without  
a explicit type sig, which is how I write parsers), and an applicative  
one.

I'd prefer something like

foo = app
	blah blah

If only for some visual distinction, I think it also resolves the "do  
knowing about types" issue.

Plus, this is a good case for some kind of custom-do syntax facility.  
So we could make do syntax for everything. :)

/Joe

On Oct 9, 2009, at 1:11 PM, Robert Atkey wrote:

> On Fri, 2009-10-09 at 18:06 +0100, Philippa Cowderoy wrote:
>
>> This leads us to the bikeshed topic: what's the concrete syntax?
>
> I implemented a simple Camlp4 syntax extension for Ocaml to do this. I
> chose the syntax:
>
>   applicatively
>   let x = foo
>   let y = bar
>   in <pure stuff>
>
> I quite like the word "applicatively".
>
> Your overloading suggestion sounds to me like it would require the
> desugaring process to know something about types, but I'm not sure.
>
> Bob
>
>
> -- 
> The University of Edinburgh is a charitable body, registered in
> Scotland, with registration number SC005336.
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe



More information about the Haskell-Cafe mailing list