I see now that there's a related question asking what these operators (<:<, <%<, =:=) do here:
What do <:<, <%<, and =:= mean in Scala 2.8, and where are they documented?
But I'm still confused about their implementation. In particular, I assume that once you've placed an implicit parameter that asserts a particular relationship, then you can use variables as if they've automatically been cast properly, e.g. this will compile:
class Foo[T](a: T) {
def splitit(implicit ev: T <:< String) = a split " "
}
But how does this actually work in the compiler? Is there some magic compiler support for these operators, and if not, what's the underlying mechanism that allows it to infer this sort of relationship from the definition? (Was this mechanism added specifically to allow these operators to work, and how specific is it to these particular operators?) It seems a little magical that you can place an extra implicit parameter like this which somehow changes the compiler's interpretation of a type.