Add LiftA4 and LiftA5

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Add LiftA4 and LiftA5

Dannyu NDos
It just feels so uncomforable that we have LiftM4 and LiftM5, but not Applicative versions of them.

_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
Reply | Threaded
Open this post in threaded view
|

Re: Add LiftA4 and LiftA5

Andrew Martin
I would like to see these added as well. I have found myself wanting them occasionally.

On Mon, May 27, 2019 at 1:40 AM Dannyu NDos <[hidden email]> wrote:
It just feels so uncomforable that we have LiftM4 and LiftM5, but not Applicative versions of them.
_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries


--
-Andrew Thaddeus Martin

_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
Reply | Threaded
Open this post in threaded view
|

Re: Add LiftA4 and LiftA5

Henning Thielemann

On Tue, 28 May 2019, Andrew Martin wrote:

> I would like to see these added as well. I have found myself wanting them occasionally.

https://hackage.haskell.org/package/utility-ht-0.0.14/docs/Control-Applicative-HT.html#v:lift4
https://hackage.haskell.org/package/utility-ht-0.0.14/docs/Control-Applicative-HT.html#v:lift5

... intended to be used with qualification like App.lift4 and App.lift5.
_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
Reply | Threaded
Open this post in threaded view
|

Re: Add LiftA4 and LiftA5

Andrew Martin
Thanks. It's good to know somewhere where I can reach for these next time I need them.

On Tue, May 28, 2019 at 3:03 PM Henning Thielemann <[hidden email]> wrote:

On Tue, 28 May 2019, Andrew Martin wrote:

> I would like to see these added as well. I have found myself wanting them occasionally.

https://hackage.haskell.org/package/utility-ht-0.0.14/docs/Control-Applicative-HT.html#v:lift4
https://hackage.haskell.org/package/utility-ht-0.0.14/docs/Control-Applicative-HT.html#v:lift5

... intended to be used with qualification like App.lift4 and App.lift5.


--
-Andrew Thaddeus Martin

_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
Reply | Threaded
Open this post in threaded view
|

Re: Add LiftA4 and LiftA5

Liang-Ting Chen
In reply to this post by Dannyu NDos
I think it is more reasonable to adopt idiom brackets proposed in (McBride & Paterson, 2007). For example, you can write

([ Just True || Just False ]) 

for

liftA2 (||) (Just True) (Just False). Oleg has written a blog post on how to use GHC 8.6's Source Plugins to achieve idiom brackets in 
 

Cheers,
L-T

On Mon, 27 May 2019 at 06:40, Dannyu NDos <[hidden email]> wrote:
It just feels so uncomforable that we have LiftM4 and LiftM5, but not Applicative versions of them.
_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries


_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries