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 NaturalTransformation to FunctionK. #1072

Merged

Conversation

peterneyens
Copy link
Collaborator

This would rename NaturalTransformation to FunctionK #1065, but we should probably wait until some more people have expressed their opinion about this change ?

I'm also not sure how to change the documentation, should we go from "a natural transformation" to "a FunctionK".

@@ -166,14 +166,14 @@ DSL. By itself, this DSL only represents a sequence of operations
To do this, we will use a *natural transformation* between type
containers. Natural transformations go between types like `F[_]` and
`G[_]` (this particular transformation would be written as
`NaturalTransformation[F,G]` or as done here using the symbolic
`FunctionK[F,G]` or as done here using the symbolic
alternative as `F ~> G`).
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This could then be something like :

To do this, we will use a FunctionK (also known as a natural transformation). A FunctionK is like a function but between type containers instead of values. A FunctionK between types F[_] and G[_] could be written as FunctionK[F, G] (or as F ~> G using the symbolic alternative).

Copy link
Contributor

Choose a reason for hiding this comment

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

I would say that we can describe the type FunctionK as a natural transformation. So, when we would put the term in backticks (i.e. code) we'd say FunctionK but otherwise we'd say transformation or natural transformation. Does this make sense?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

That does make sense, yes. It felt weird to use FunctionK in the documentation, that's why I left the documentation itself untouched.

@non
Copy link
Contributor

non commented May 30, 2016

This is great, thanks!

I think for now we should remove type NaturalTransformation. We can add it back in if a bunch of people complain but having too many names for the same thing will probably confuse the issue.

Relatedly, I think we should remove the <~ alias. I don't think there's ever a situation where code can't just use ~>.

@codecov-io
Copy link

codecov-io commented May 30, 2016

Current coverage is 88.37%

Merging #1072 into master will increase coverage by <.01%

  1. 2 files (not in diff) in ...main/scala/cats/laws were modified. more
  2. 4 files (not in diff) in .../main/scala/cats/std were modified. more
    • Hits -15
  3. 2 files (not in diff) in ...n/scala/cats/functor were modified. more
  4. 5 files (not in diff) in ...main/scala/cats/data were modified. more
    • Misses -1
    • Hits -13
  5. 4 files (not in diff) in .../src/main/scala/cats were modified. more
    • Misses -2
    • Hits +1
  6. 2 files (not in diff) in ...cats/laws/discipline were deleted. more
  7. 2 files (not in diff) in ...main/scala/cats/laws were deleted. more
  8. 2 files (not in diff) in .../src/main/scala/cats were deleted. more
  9. File ...cats/free/Free.scala was modified. more
    • Misses -1
    • Partials 0
    • Hits -6
  10. File ...a/cats/package.scala was modified. more
    • Misses 0
    • Partials 0
    • Hits -1
@@             master      #1072   diff @@
==========================================
  Files           221        215     -6   
  Lines          2798       2743    -55   
  Methods        2743       2689    -54   
  Messages          0          0          
  Branches         50         49     -1   
==========================================
- Hits           2472       2424    -48   
+ Misses          326        319     -7   
  Partials          0          0          

Sunburst

Powered by Codecov. Last updated by d3c64d1...19cacbd

@peterneyens peterneyens force-pushed the rename-natural-transformation-functionk branch from 19cacbd to 637a0b9 Compare May 30, 2016 19:37
@ceedubs
Copy link
Contributor

ceedubs commented May 31, 2016

@peterneyens thanks, this looks great! Sorry, but it has a merge conflict. Would you mind resolving it?

@peterneyens peterneyens force-pushed the rename-natural-transformation-functionk branch from 637a0b9 to 8509cd4 Compare May 31, 2016 12:40
@non
Copy link
Contributor

non commented May 31, 2016

Perfect. 👍 Thanks!

@ceedubs
Copy link
Contributor

ceedubs commented May 31, 2016

👍

@ceedubs ceedubs merged commit 92269f7 into typelevel:master May 31, 2016
@peterneyens peterneyens deleted the rename-natural-transformation-functionk branch May 31, 2016 20:41
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.

4 participants