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

Rename *Aux helper classes to *Curried #577

Merged
merged 2 commits into from Oct 31, 2015
Merged

Conversation

fthomas
Copy link
Member

@fthomas fthomas commented Oct 17, 2015

We currently have a few helper classes that have an Aux suffix
for emulating currying type parameters. These helper classes have
an apply method which allows some type parameters of a function
to be inferred while others need to be specified. @tpolecat has
nice explanation of this trick here:

http://tpolecat.github.io/2015/07/30/infer.html

Unfortunately the suffix Aux is an overloaded term that is most
prominently used to provide terser syntax for type refinements, e.g.:

type Aux[F[_], A, B] = Coyoneda[F, A] { type Pivot = B }

I'm wondering if we should use Curried instead of Aux for classes
that enable type parameter currying. This could make the purpose of
those classes clearer to those who are unfamiliar with this trick.

We currently have a few helper classes that have an `Aux` suffix
for emulating currying type parameters. These helper classes have
an `apply` method which allows some type parameters of a function
to be inferred while others need to be specified. @tpolecat has
nice explanation of this trick here:

http://tpolecat.github.io/2015/07/30/infer.html

Unfortunately the suffix `Aux` is an overloaded term that is most
prominently used to provide terser syntax for type refinements, e.g.:

type Aux[F[_], A, B] = Coyoneda[F, A] { type Pivot = B }

I'm wondering if we should use `Curried` instead of `Aux` for classes
that enable type parameter currying. This could make the purpose of
those classes clearer to those who are unfamiliar with this trick.
@codecov-io
Copy link

Current coverage is 76.15%

Merging #577 into master will increase coverage by +0.45% as of e428a1d

@@            master    #577   diff @@
======================================
  Files          157     158     +1
  Stmts         2165    2172     +7
  Branches        68      68       
  Methods          0       0       
======================================
+ Hit           1639    1654    +15
  Partial          0       0       
+ Missed         526     518     -8

Review entire Coverage Diff as of e428a1d

Powered by Codecov. Updated on successful CI builds.

@ceedubs
Copy link
Contributor

ceedubs commented Oct 17, 2015

I don't have any very strong opinions on this, but it seems reasonable to me 👍

@milessabin
Copy link
Member

I've used Aux as a suffix for this purpose, but I agree that it is very overloaded, and the primary use is, as @fthomas says, as terser syntax for refinements.

I think that this is about partial application rather than currying however, so maybe Partial or PartiallyApplied as a suffix? It's not expected that a user would have to name these types explicitly, so a little verbosity shouldn't be an issue.

@travisbrown
Copy link
Contributor

I've used -Helper or just -er for these things, in an attempt to make it clear that they're just a type inference hack and have nothing interesting going on, but I like -PartiallyApplied a lot better. I definitely agree that -Aux should be changed.

@fthomas
Copy link
Member Author

fthomas commented Oct 18, 2015

👍 for PartiallyApplied

@ceedubs
Copy link
Contributor

ceedubs commented Oct 20, 2015

👍

1 similar comment
@stew
Copy link
Contributor

stew commented Oct 31, 2015

👍

stew added a commit that referenced this pull request Oct 31, 2015
Rename *Aux helper classes to *Curried
@stew stew merged commit 870a30d into typelevel:master Oct 31, 2015
@stew stew removed the in progress label Oct 31, 2015
@julienrf
Copy link
Contributor

Conversely, do you think we should rename Aux to Uncurried?

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

Successfully merging this pull request may close these issues.

None yet

8 participants