Skip to content

Instantly share code, notes, and snippets.

@akhileshs
Created May 7, 2016 16:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save akhileshs/577ca43c6b868449d8cdbc7edd2510f9 to your computer and use it in GitHub Desktop.
Save akhileshs/577ca43c6b868449d8cdbc7edd2510f9 to your computer and use it in GitHub Desktop.
scala> type Foo[A, B] = Map[A, B]
defined type alias Foo
scala> type World[M[_]] = M[Int]
warning: there was one feature warning; re-run with -feature for details
defined type alias World
scala> type X[A] = World[({ type M[A] = Foo[String, A] })#M]
defined type alias X
scala> implicitly[X[Int] =:= Foo[String, Int]]
res3: =:=[X[Int],Foo[String,Int]] = <function1>
scala>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment