为什么 "Towers of Hanoi" 在 scala 2.11.4 下不工作?

Why "Towers of Hanoi" is not working under scala 2.11.4?

代码来自https://gist.github.com/jrudolph/66925:

object TowersOfHanoi {
  import scala.reflect.Manifest

  def simpleName(m:Manifest[_]):String = {
    val name = m.toString
    name.substring(name.lastIndexOf('$')+1)
  }

  trait Nat
  final class _0 extends Nat
  final class Succ[Pre<:Nat] extends Nat

  type _1 = Succ[_0]
  type _2 = Succ[_1]
  type _3 = Succ[_2]
  type _4 = Succ[_3]

  case class Move[N<:Nat,A,B,C]()

  implicit def move0[A,B,C](implicit a:Manifest[A],b:Manifest[B]):Move[_0,A,B,C] = { 
        System.out.println("Move from "+simpleName(a)+" to "+simpleName(b));null
  }

  implicit def moveN[P<:Nat,A,B,C](implicit m1:Move[P,A,C,B],m2:Move[_0,A,B,C],m3:Move[P,C,B,A])
    :Move[Succ[P],A,B,C] = null 

  def run[N<:Nat,A,B,C](implicit m:Move[N,A,B,C]) = null

  case class Left()
  case class Center()
  case class Right()

  def main(args:Array[String]){
    run[_2,Left,Right,Center]
  }
}

我记得当我编译它时,它在几年前用 Scala 2.8.

输出了类似 "Move from Left to Right" 的东西

今天,我用 Scala 2.11.4 试了一下,它没有输出任何东西!

Scala 有什么变化吗?以及如何修复它?

WFM(适合我)

scala> TowersOfHanoi.main(null)
Move from Left to Right
Move from Left to Center
Move from Right to Center
Move from Left to Right
Move from Center to Left
Move from Center to Right
Move from Left to Right

我会说我不会理解代码本身 - implicits/types 是钝的并且是旧的 Manifest 风格。 2.10+ 更喜欢 TypeTags / ClassTags。