これは最も正しい用語ではないかもしれませんが、ボックス化された型とBox[T]は type のことTです。箱入りOption[Int]も同様Intです。
これらのタイプを抽出するにはどうすればよいでしょうか? 私の素朴な試み:
//extractor
type X[Box[E]] = E //doesn't compile. E not found
//boxed
type boxed = Option[Int]
//unboxed
type parameter = X[boxed] //this is the syntax I would like to achieve
implicitly[parameter =:= Int] //this should compile
これを行う方法はありますか?Apocalisp ブログを除けば、Scala での型レベルのメタプログラミングに関する指示を見つけるのに苦労しています。