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

All dimensions were made to have implicit field equal to this. #326

Merged
merged 6 commits into from
Feb 12, 2019

Conversation

buzden
Copy link
Contributor

@buzden buzden commented Nov 28, 2018

This allows us to have nice implicit instance when Dimension[Q] is a
companion object to some quantity.

This solves #320 and allows e.g. to write a single cats' Monoid (or even CommutativeGroup) instance for all quantities (i.e. to have def groupInstance[Q <: Quantity[Q]: Dimension]: Group[Q] or so).

This allows us to have nice implicit instance when `Dimension[Q]` is a
companion object to some quantity.
@buzden buzden force-pushed the make-dimensions-implicit branch from 660fd2e to 3149cd7 Compare November 28, 2018 15:23
buzden added a commit to buzden/squants-cats that referenced this pull request Nov 28, 2018
This is a dumb workarond of lack os implicitness of `Dimension[Q]`
instances. Once typelevel/squants#320 is solved (e.g.,
typelevel/squants#326 is merged), there will be no need in such stuff.
@buzden buzden force-pushed the make-dimensions-implicit branch from 3149cd7 to d9018ca Compare November 28, 2018 16:54
@cquiroz
Copy link
Collaborator

cquiroz commented Nov 29, 2018

This looks good to me, I'll wait for other committers to chime in before merging

Copy link
Contributor

@garyKeorkunian garyKeorkunian left a comment

Choose a reason for hiding this comment

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

Looks good to me

@garyKeorkunian garyKeorkunian merged commit 39f3f7f into typelevel:master Feb 12, 2019
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.

3 participants