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

Swap order of G[_] and A in Applicative.sequence #292

Merged
merged 1 commit into from
Apr 27, 2015

Conversation

ceedubs
Copy link
Contributor

@ceedubs ceedubs commented Apr 25, 2015

Fixes #285.

Scalaz has a style convention that kinds always go before types in
method signatures. Should we adopt the same convention?

Fixes typelevel#285.

Scalaz has a style convention that kinds always go before types in
method signatures. Should we adopt the same convention?
@ceedubs
Copy link
Contributor Author

ceedubs commented Apr 25, 2015

Before this change:

scala> listInstance.sequence[Option, Int](List(Option(1),Option(3)))
<console>:14: error: Int takes no type parameters, expected: one
              listInstance.sequence[Option, Int](List(Option(1),Option(3)))

After this change:

scala> listInstance.sequence[Option, Int](List(Option(1),Option(3)))
res0: Option[List[Int]] = Some(List(1, 3))

@stew
Copy link
Contributor

stew commented Apr 25, 2015

👍

@non
Copy link
Contributor

non commented Apr 26, 2015

Do you know if we have been consistent in other places about the order of type parameters?

I give this PR 👍 but it would be a shame if we've used this other order elsewhere.

@non
Copy link
Contributor

non commented Apr 27, 2015

After a bit of investigation I think it's safe to just merge this now.

non added a commit that referenced this pull request Apr 27, 2015
Swap order of G[_] and A in Applicative.sequence
@non non merged commit 6c0cfe4 into typelevel:master Apr 27, 2015
@non non removed the in progress label Apr 27, 2015
@ceedubs ceedubs deleted the sequence-type-params branch May 3, 2015 21:28
ceedubs added a commit to ceedubs/cats that referenced this pull request Nov 4, 2015
This is a delayed follow up to typelevel#292 which sets a precedent of a
preference for higher-kinded types coming first in type parameters.
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.

listInstance inherits incompatible sequence signatures from Applicative and Traverse?
3 participants