<https://github.com/Redrield/refinement-units> pro...
# arrow-meta
r
https://github.com/Redrield/refinement-units proof of concept for a type-safe units of measure library that im toying with using arrow
😱 1
🙌 1
r
I think you may be one of the first or the first to ever perform typelevel arithmetics with types in the Kotlin compiler https://github.com/Redrield/refinement-units/blob/master/refinement-typeck/src/main/kotlin/frc/team4069/saturn/typeck/refineNumerics.kt#L36
t
Is it based on refinement types?
k
I haven't tested it, but it seems to only allow the powers 0-20 for the si units, does this mean you can't have things like velocity (m/s)? Or am I missing something?
r
I'm gonna be pushing a change soon that adds a new class
Neg<Num>
to represent negative numbers