-
Notifications
You must be signed in to change notification settings - Fork 373
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
Conversation
@@ -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 |
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.
Or should it be chainRec :: ChainRec m => ((a -> c, b -> c, a) -> m c, a) -> m b
?
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.
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
).
LGTM |
@safareli as you implemented this, do you want to comment on it, before we do any changes? |
LGTM 🌟 |
* '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) ...
For consistency with other signatures.