Scala identifier names cannot contain a mix of symbols and characters. This applies uniformly on method as well as type and type constructor names.
scala> type =m=>[A, B] = Map[A, B]
<console>:1: error: identifier expected but '=' found.
type =m=>[A, B] = Map[A, B]
^
scala> type ===>[A, B] = Map[A, B]
defined type alias $eq$eq$eq$greater
scala> type mmmm[A, B] = Map[A, B]
defined type alias mmmm
compare with:
scala> def foo = 3
foo: Int
scala> def === = 3
$eq$eq$eq: Int
scala> def =foo= = 3
<console>:1: error: identifier expected but '=' found.
def =foo= = 3
^
The only exception is foo_<symbol-here>
but which will not help you name something =m=>
.
scala> def foo_? = 3
foo_$qmark: Int
scala> def foo_* = 3
foo_$times: Int
scala> def foo_==> = 3
foo_$eq$eq$greater: Int