I would like to pattern match for the tree of the x -> y
operation in Scala macros. I am cross compiling against Scala 2.10.4 (with Macro Paradise) and Scala 2.11.x. I have tried the following patterns and none worked:
arrowTree match {
case q"$x -> $y" => ???
case q"scala.Predef.ArrowAssoc[${_}, ${_}]($x).->$y" => ???
case q"_root_.scala.Predef.ArrowAssoc[${_}, ${_}]($x).->$y" => ???
case q"_root_.scala.Predef.ArrowAssoc($x).->$y" => ???
}
What patterns would make this match work for both 2.10.4 and 2.11.x?