title: Can we define a higher-kinded type-level identity function in Scala?
body: <p>In Scala we can define the type-level identity function for lower-kinded types like so,</p>
  
  <pre><code>type Id[A] = A
  </code></pre>
  
  <p>Can we also define something similar for higher-kinded types? Ie. can we fill in the blanks in,</p>
  
  <pre><code>type HKId[A[...]] = ...
  </code></pre>
  
  <p>so that something similar to HKId[List] gets us back to the List type constructor?</p>
  
  <p>Binding of free names in things like,</p>
  
  <pre><code>type Foo[X] = List[X]
  val l : Foo[Int] = List(1, 2, 3)
  </code></pre>
  
  <p>Might lead us to expect that a higher-kinded type-level identity would look like,</p>
  
  <pre><code>type HKId[A[X]] = A[X]
  </code></pre>
  
  <p>but scalac complains that type X is not found on the RHS.</p>
  
  <p>Is there some clever encoding that will do the trick? Or is it just not possible right now?</p>