-
Notifications
You must be signed in to change notification settings - Fork 9
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
scala3 questions #291
Comments
That second one should be |
Maybe it is related to Unitless. Here is a minimal reproduction import coulomb.*
import coulomb.syntax.*
import algebra.instances.all.given
import coulomb.ops.algebra.spire.all.given
import coulomb.policy.spire.standard.given
import coulomb.units.si.*
import coulomb.units.si.given
import scala.math._
object ItcImpl2 {
val expTime: Quantity[BigDecimal, Second] = ???
val nExp = 1
val totalTime: Quantity[BigDecimal, Second] =
expTime * nExp.withUnit[Unitless]
}
With error:
|
@cquiroz I am failing to reproduce that error. I wrote this and it compiled with no errors, although it threw a bunch of warnings about object repro {
import coulomb.*
import coulomb.syntax.*
import algebra.instances.all.given
import coulomb.ops.algebra.spire.all.given
import coulomb.policy.spire.standard.given
import coulomb.units.si.*
import coulomb.units.si.given
import scala.math._
object ItcImpl2 {
val expTime: Quantity[BigDecimal, Second] = BigDecimal(1).withUnit[Second]
val nExp = 1
val totalTime: Quantity[BigDecimal, Second] =
expTime * nExp.withUnit[Unitless]
}
} |
Thanks turns out it works when doing imports as |
@cquiroz thanks for the pointer! I will try to keep that in mind |
I did a first attempt trying to use coulomb in scala 3. I got quite a bit of progress on a relatively simple library that uses coulomb but I have some errors I can't solve, having tried several imports.
How could I get this work?
I'm importing
I have a few similar errors for division and multipaction. I guess I'm missing an algebra?
Any guidance would be appreciated
The text was updated successfully, but these errors were encountered: