I just read the post Creative uses of monads, that is crowded of very interesting ideas and references, so I got curious: what about arrows? I'm not looking for personal opinions or references on the basics or "standard" uses (as in monads vs arrows or help understanding arrows in haskell), but rather for a list of references to smart and/or non-trivial applications (maybe in research papers?). Thanks.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Arrows can be used for security:
A very interesting paper by Li and Zdancewic (Encoding Information Flow in Haskell) use arrows to encode information flow in Haskell. I.e. their proposal makes it possible to ensure that classified information is not leaked to processes without the right privileges.
Tsai et. al builds on the work by Li and Zdancewic, and extends it to a multi-threaded environment (A Library for Secure Multi-threaded Information Flow in Haskell). They even demonstrate how it can be used to thwart certain side-channel attacks.
回答2:
One of the first Haskell modules I ever wrote was a sort of quantum-imperative arrow with "wavefunction collapse" whenever I/O was done. http://hackage.haskell.org/package/quantum-arrow