You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use an approach similar to numeric-vc to derive typeclasses.
Note that this cannot work for multiplication, since the quantity type outputted is different.
EDIT: I realize that I don't actually mean this, since numeric-vc is meant for deriving all kinds of typeclass instances given a base AnyVal. What I actually want is derived spire typeclasses instances, given that A has a typeclass instance.
e.g. If A has an AdditiveSemigroup, then an AdditiveSemigroup[Quantity[A, D]] can be derived.
This is difficult because the quantities' dimensions are ordered, and an AdditiveSemigroup won't work on types which aren't exactly the same.
The text was updated successfully, but these errors were encountered:
Use an approach similar to numeric-vc to derive typeclasses.Note that this cannot work for multiplication, since the quantity type outputted is different.
EDIT: I realize that I don't actually mean this, since numeric-vc is meant for deriving all kinds of typeclass instances given a base
AnyVal
. What I actually want is derived spire typeclasses instances, given thatA
has a typeclass instance.e.g. If
A
has anAdditiveSemigroup
, then anAdditiveSemigroup[Quantity[A, D]]
can be derived.This is difficult because the quantities' dimensions are ordered, and an
AdditiveSemigroup
won't work on types which aren't exactly the same.The text was updated successfully, but these errors were encountered: