[Haskell-cafe] Applicative do?
pumpkingod at gmail.com
Fri Oct 9 13:52:15 EDT 2009
I'd prefer "idiom brackets" over something do-ish for Applicatives.
Conor McBride's SHE already supports them, if you're willing to use a
On Fri, Oct 9, 2009 at 1:45 PM, Joe Fredette <jfredett at gmail.com> wrote:
> 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. :)
> 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:
>> 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.
>> The University of Edinburgh is a charitable body, registered in
>> Scotland, with registration number SC005336.
>> Haskell-Cafe mailing list
>> Haskell-Cafe at haskell.org
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
More information about the Haskell-Cafe