[Haskell-cafe] arrow notation

Petr Pudlák petr.mvd at gmail.com
Sun Feb 10 21:28:12 CET 2013


2013/2/9 Conal Elliott <conal at conal.net>

>
> On Thu, Feb 7, 2013 at 5:41 PM, Ross Paterson <ross at soi.city.ac.uk> wrote:
>
>>
>> It's hard to imagine arrow notation without arr (or at least
>> contravariance in the first argument of the "arrow") because forming
>> expressions using the local environment is so central to it.  That is,
>> I can't imagine what things you are trying to write in that situation.
>>
>
> What I have in mind is a small collection of methods including fst & snd
> (and similarly for sums) that could be defined via arr but could instead
> form the basis of translating restricted arrow notation for (pseudo-)arrows
> that don't support arr.
>

I also support this idea, I'd appreciate such a generalization.

As an example, where it would be useful: One of my students was working on
a (very nice) project where he used Haskell as a DSL for generating a FRP-like
javascript code.  The arrow notation without "arr" would be ideal for this
situation. He couldn't implement "arr" as it would require to translate an
arbitrary Haskell function to JS. So having a more general variant of
"Arrow" without "arr" and with a collection of methods sufficient for the
arrow notation would be quite helpful. (I wonder what methods would have to
be included in the collection.)

Best regards,
Petr Pudlak
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20130210/06588777/attachment.htm>


More information about the Haskell-Cafe mailing list