Dear Scala community, a feature I'm looking for: "display scalac errors on my types in my own way, specially the string format of my types in Scalac messages" (like implicitNotFound for example) Is it already possible & Im missing something or is it something not even imaginable?
-
-
Replying to @mandubian
If you want to prettyprint type mismatches, create a (general) implicit conversion between the bad and expected types, implement it with a macro, deconstruct the type tags, http://c.info () the output, then throw an exception in the macro so it won't spuriously compile.
1 reply 0 retweets 0 likes -
Replying to @propensive @mandubian
Note that the type tags might not be useful if you're deconstructing covariant type parameters, though. Which is a shame for HLists, for example.
1 reply 0 retweets 0 likes -
Replying to @propensive
which I'd like to be possible too... we need to be able to customise scalac errors more & more
2 replies 0 retweets 0 likes
It might be possible to persuade the compiler to instantiate those covariant types with something other than Nothing, but I didn't manage it after trying for about 20 minutes...
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.