|
|
|
|
|
|
|
|
|
|
|
# Arrow Notation
|
|
|
|
|
|
|
|
|
## Brief Explanation
|
|
|
|
|
|
|
|
|
|
|
|
Convenient notation for writing programs using arrows.
|
|
|
|
|
|
|
|
|
|
|
|
As this is an extension of the 'do'-notation, and as it has its own way of dealing with recursive definitions,
|
|
|
this is related to [RecursiveDo](recursive-do). On the one hand, it might be that the arrow `rec` notation might be suitabe
|
|
|
for monadic recursive `do` as well, instead of `mdo`. Arguably, `rec` is a bit more suggestive. On the
|
|
|
other hand, if it is decided that the monadic `do` should be implicitly recursive, then it would make sense
|
|
|
to try to do the same for the arrow `do`. And if that is not possible, that could be considered an argument
|
|
|
against making the monadic `do` implicitly recursive.
|
|
|
|
|
|
|
|
|
## References
|
|
|
|
|
|
|
|
|
- [ GHC documentation](http://www.haskell.org/ghc/docs/latest/html/users_guide/arrow-notation.html)
|
|
|
- [ Arrows page](http://www.haskell.org/arrows/)
|
|
|
- [RecursiveDo](recursive-do)
|
|
|
|
|
|
## Tickets
|
|
|
|
|
|
|
|
|
|
|
|
<table><tr><th>[\#13](https://gitlab.haskell.org//haskell/prime/issues/13)</th>
|
|
|
<td>add Arrows</td></tr></table>
|
|
|
|
|
|
|
|
|
|
|
|
## Pros
|
|
|
|
|
|
|
|
|
- makes arrows programs manageable
|
|
|
|
|
|
## Cons
|
|
|
|
|
|
|
|
|
- fairly large extension
|
|
|
- few users
|
|
|
|
|
|
## Neutral
|
|
|
|
|
|
|
|
|
- can be implemented in a preprocessor |