Arrow syntax vs. functional style (Was: Monad of no `return` Proposal (MRP): Moving `return` out of `Monad`)
Henning Thielemann
lemming at henning-thielemann.de
Sun Oct 18 17:51:43 UTC 2015
On Sat, 3 Oct 2015, Henrik Nilsson wrote:
> For example, I have written quite a bit of applicative code, way before
> it was even called applicative, and I did not find the lack of syntactic
> support particularly bothersome. On the other hand, I have also written
> a lot of arrowized code, and there, while I do use the syntactic sugar
> to allow me to name certain things, the fact that I then have to name
> everything is rather annoying to say the least, and I have often found
> myself wishing that I could write arrowized code that looked a lot more
> like applicative code (without the sugar).
I was unhappy about arrow syntax for the same reasons and with Mr.
Apfelmus I developed a technique that allows to apply Arrows in an
Applicative style. However, because it relies on the Vault data structure
it works efficiently only for EDSL things. Unfortunately we have not
written up the method so far, I have only a complicated module that
employs the method:
https://hackage.haskell.org/package/synthesizer-llvm-0.7.0.1/src/src/Synthesizer/LLVM/CausalParameterized/Functional.hs
If I find time I could extract the according code to a new package.
More information about the Libraries
mailing list