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 …
-
Show this thread
-
Thanks to Oron Port for the hint to get me started!
2 replies 0 retweets 4 likesShow this thread -
Replying to @propensive
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
1 reply 0 retweets 0 likes
Replying to @fst9000
I can give it a try on my next flight!
6:55 AM - 16 Jun 2019
0 replies
0 retweets
2 likes
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.