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

Fix chainRec signature to not use currying #167

Merged
merged 2 commits into from
Sep 16, 2016

Conversation

rpominov
Copy link
Member

For consistency with other signatures.

@@ -335,7 +335,7 @@ A value that implements the ChainRec specification must also implement the Chain
#### `chainRec` method

```hs
chainRec :: ChainRec m => ((a -> c) -> (b -> c) -> a -> m c) -> a -> m b
chainRec :: ChainRec m => ((((a -> c), (b -> c), a) -> m c), a) -> m b
Copy link
Member Author

Choose a reason for hiding this comment

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

Or should it be chainRec :: ChainRec m => ((a -> c, b -> c, a) -> m c, a) -> m b?

Copy link
Member

Choose a reason for hiding this comment

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

Or should it be chainRec :: ChainRec m => ((a -> c, b -> c, a) -> m c, a) -> m b?

Yes, it should be. Since we represent ternary functions as (…, …, …) -> … and , has no other meaning in our grammar, there's no need to parenthesize an argument type (even if the type is something like a -> c).

@davidchambers
Copy link
Member

LGTM

@SimonRichardson
Copy link
Member

@safareli as you implemented this, do you want to comment on it, before we do any changes?

@safareli
Copy link
Member

LGTM 🌟

@SimonRichardson SimonRichardson merged commit 9075b3b into fantasyland:master Sep 16, 2016
rjmk added a commit to rjmk/fantasy-land that referenced this pull request Nov 12, 2016
* 'master' of github.com:fantasyland/fantasy-land: (29 commits)
  Version 2.1.0
  Add Alt, Plus and Alternative specs (fantasyland#197)
  Use uppercase letters for Type representatives in laws (fantasyland#196)
  Fix id_test and argument order in laws (fantasyland#193)
  Version 2.0.0
  Another go at updating dependencies (fantasyland#192)
  release: integrate xyz (fantasyland#191)
  test: remove unnecessary lambdas (fantasyland#190)
  require static methods to be defined on type representatives (fantasyland#180)
  lint: integrate ESLint (fantasyland#189)
  Enforce parametricity (fantasyland#184)
  readme: tweak signatures to indicate that methods are not curried (fantasyland#183)
  Fix reduce signature to not use currying (fantasyland#182)
  Link to dependent specifications (fantasyland#178)
  Add Fluture to the list of implementations (fantasyland#175)
  laws/functor: fix composition (fantasyland#173)
  laws/monad: fix leftIdentity (fantasyland#171)
  Minor version bump
  bower: add bower.json (fantasyland#159)
  Fix chainRec signature to not use currying (fantasyland#167)
  ...
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

4 participants