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

Chapter 3 - repl print out for "flip" needs updating? #326

Closed
danielrlc opened this issue Apr 28, 2021 · 2 comments · Fixed by #447
Closed

Chapter 3 - repl print out for "flip" needs updating? #326

danielrlc opened this issue Apr 28, 2021 · 2 comments · Fixed by #447

Comments

@danielrlc
Copy link

danielrlc commented Apr 28, 2021

Should this repl printout in Chapter 3 be updated?

Book

> import Prelude
> :type flip
forall a b c. (a -> b -> c) -> b -> a -> c

repl (for PureScript 0.14.1)

> import Prelude
> :type flip
forall (a :: Type) (b :: Type) (c :: Type). (a -> b -> c) -> b -> a -> c

In general, would it be better if an edit suggestion like this comes through a PR? (I thought I'd start small, though.)

@milesfrain
Copy link
Member

Wow. It looks like all :type output has been "clarified" with additional kind information (e.g. the kind of a type).

> :t flip
forall (a :: Type) (b :: Type) (c :: Type). (a -> b -> c) -> b -> a -> c

> :t const
forall (a :: Type) (b :: Type). a -> b -> a

> :t add
forall (a :: Type). Semiring a => a -> a -> a

> :t map
forall (f :: Type -> Type) (a :: Type) (b :: Type). Functor f => (a -> b) -> f a -> f b

In general, would it be better if an edit suggestion like this comes through a PR?

Either a PR or issue is fine. Thanks for reporting.

In this case, I think there's a lot of stuff to sort out, such as:

Your proposal to include a "Don't worry" note in #260 (comment) may also be a reasonable temporary fix.

Feel free to make a PR for any of the above todos. You're also welcome to copy over this series map/flip examples and explanation, if you think that would make sense in Ch4. I'd also be happy to make these edits, but probably won't get around to it within the next month, and want to give first dibs to potential new contributors.

@danielrlc
Copy link
Author

Thanks for clarifying what was going on in the repl output.

I'll keep working through the book and see what I could make a PR or an issue on, out of the things you suggested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants