I had a go at modifying the Scala 3 type system to support inline arithmetic in singleton literals. The compiler will now typecheck this: import compiletime._ the[(2 + 2)*2 =:= 5 + 3] https://github.com/propensive/dotty/tree/typelevel-singleton-literal-type-arithmetic …
-
-
What do you think about implementing <, >, <=, etc.? I've a use-case in refined where I'd like to write the following: implicit def greaterImplies[A, B](implicit ev: A > B): Greater[A] Implies Greater[B] = ... which does not compile if A <= B
-
I can give it a try on my next flight!
End of conversation
New conversation -
-
-
PRs for singleton-ops that crossbuild with dotty are welcome ;)
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.