Skip to content
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

Merged
merged 4 commits into from
Oct 29, 2013
Merged

[WIP] Add arrows intro #8

merged 4 commits into from
Oct 29, 2013

Conversation

knuton
Copy link
Collaborator

@knuton knuton commented Oct 27, 2013

TODO:

  • Parametrised types as context
  • Arrow laws
  • Non-trivial arrow instance
  • Revise "too general" passage

@yfyf
Copy link
Owner

yfyf commented Oct 27, 2013

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
Copy link
Owner

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.

Copy link
Collaborator Author

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.

Copy link
Owner

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.

@yfyf
Copy link
Owner

yfyf commented Oct 27, 2013

Anyway, I think it's OK the way it is now, I'm not feeling picky and these are merely suggestions.

@knuton
Copy link
Collaborator Author

knuton commented Oct 28, 2013

Integrated.

instance Arrow (->) where
arr f = f
(>>>) f g = (.) g f
first f = \textbackslash(x, y) -> (f x, y)\textrm{,}
Copy link
Owner

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?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Fixed.

@yfyf
Copy link
Owner

yfyf commented Oct 29, 2013

Perhaps I'll merge this now?

@knuton
Copy link
Collaborator Author

knuton commented Oct 29, 2013

Yeah, I'll open an issue with the leftover TODOs as a reminder.

@knuton knuton mentioned this pull request Oct 29, 2013
3 tasks
@yfyf
Copy link
Owner

yfyf commented Oct 29, 2013

👍

yfyf added a commit that referenced this pull request Oct 29, 2013
@yfyf yfyf merged commit 3fa16e6 into master Oct 29, 2013
@yfyf yfyf deleted the arr_practically branch October 29, 2013 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants