Help needed: Restrictions of proc-notation with RebindableSyntax
amindfv at gmail.com
amindfv at gmail.com
Wed Dec 21 19:49:33 UTC 2016
> El 21 dic 2016, a las 02:36, Simon Peyton Jones via ghc-devs <ghc-devs at haskell.org> escribió:
>
>
>
> I even wonder (whisper it) about taking it out altogether, when Edward says “many of the original applications for arrows have been shown to be perfectly suited to being handled by Applicatives” (i.e. with no extensions except AppliciativeDo. But I have no data on whether anyone (at all) is using arrow notation these days, and if so how mission-critical it is to them; and old packages like Yampa certainly use it.
Unfortunately ApplicativeDo is for a very limited use-case, of the form:
do a0 <- x0
a1 <- x1 -- x1 cannot refer to a0
...
pure ...
-- last line must be "pure", "pure $", "return" or "return $"
Additionally, Opaleye uses Arrow syntax pretty heavily iirc.
I haven't actually prototyped it, but I dream of an ApplicativeDo or ArrowDo which desugars do blocks with join in place of >>= , so any do-block which doesn't use any joins doesn't require the monad constraint...
Tom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20161221/f0cd1a1e/attachment.html>
More information about the ghc-devs
mailing list