-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Add arrows intro #8
Conversation
Readin'. |
@@ -0,0 +1,50 @@ | |||
\section{Arrows in Haskell} | |||
|
|||
If all that computer programs do would be to operate on a fixed number of inputs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't you already talk about something similar in the intro? If not, then I think this paragraph maybe better fits the intro.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In some sense yeah, and clearly I'd need to align these parts, but I don't think repetition hurts.
The question is, can we just talk about arrows as the general interface to computation they are, or do we have go into their genesis as generalization of monads. If the latter is the case, then I think this here makes a good intro.
I would go ahead saying: As briefly mentioned before, there was already an earlier Haskell feature inspired by cats that was meant to encapsulate notions of computation, but it turned out to be unfit for some applications. Thus Hughes introduced the above interface instead, where he clearly built upon understanding won from monads.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In some sense yeah, and clearly I'd need to align these parts, but I
don't think repetition hurts.
Sure
The question is, can we just talk about arrows as the general
interface to computation they are, or do we have go into their
genesis as generalization of monads. If the latter is the case, then
I think this here makes a good intro.
So, I think you can present them as being independent of Monads, but
still give some links / examples using mondas for ease of understanding.
Anyway, I think it's OK the way it is now, I'm not feeling picky and these are merely suggestions. |
Integrated. |
instance Arrow (->) where | ||
arr f = f | ||
(>>>) f g = (.) g f | ||
first f = \textbackslash(x, y) -> (f x, y)\textrm{,} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The \textbackslash
seems to produce the following warning:
Chapter 2.
(./chapters/arrows-practice.tex [5] [6]
LaTeX Font Warning: Font shape `OMS/cmtt/m/n' undefined
(Font) using `OMS/cmsy/m/n' instead
(Font) for symbol `textbackslash' on input line 119.
) (./chapters/freyd-cats.tex [7] [8]) [9]
Do you also get this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. Fixed.
Is there no better way to do this?
Perhaps I'll merge this now? |
Yeah, I'll open an issue with the leftover TODOs as a reminder. |
👍 |
TODO: