Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

type tags for higher kinds #6113

Closed
scabug opened this issue Jul 20, 2012 · 9 comments
Closed

type tags for higher kinds #6113

scabug opened this issue Jul 20, 2012 · 9 comments
Assignees
Milestone

Comments

@scabug
Copy link

scabug commented Jul 20, 2012

trait Foo[C[_]]

object Test extends App {
  import scala.reflect.runtime.universe._
  typeTag[Foo[({type l[X] = (Int, X)})#l]]
}
C:\Projects\Kepler\sandbox @ topic/dont-unexpand-macros>scalac -Xlog-implicits Test.scala
materializing requested reflect.runtime.universe.type.TypeTag[Foo[[X](Int, X)]] using `package`.this.materializeTypeTag[Foo[[X](Int, X)]](scala.reflect.runtime.`package`.universe)
materializing requested reflect.runtime.universe.type.TypeTag[X] using `package`.this.materializeTypeTag[X](scala.reflect.runtime.`package`.universe)
Test.scala:5: `package`.this.materializeTypeTag[Foo[[X](Int, X)]](scala.reflect.runtime.`package`.universe) is not a valid implicit value for reflect.runtime.universe.TypeTag[Foo[[X](Int, X)]] because:
failed to typecheck the materialized tag:
cannot reify TypeTag having unresolved type parameter X
  typeTag[Foo[({type l[X] = (Int, X)})#l]]
         ^
Test.scala:5: error: No TypeTag available for Foo[[X](Int, X)]
  typeTag[Foo[({type l[X] = (Int, X)})#l]]
         ^
one error found
@scabug
Copy link
Author

scabug commented Jul 20, 2012

Imported From: https://issues.scala-lang.org/browse/SI-6113?orig=1
Reporter: @xeno-by

@scabug
Copy link
Author

scabug commented Jul 20, 2012

@xeno-by said:
Strictly speaking X is indeed a type parameter, however here it's used as an existential skolem, and we do allow existentials in ground type tags.

@scabug
Copy link
Author

scabug commented Jul 20, 2012

@scabug
Copy link
Author

scabug commented Jul 20, 2012

@harrah said:
This is essentially #2915, except it is for TypeTags instead of Manifests.

@scabug
Copy link
Author

scabug commented Jul 20, 2012

@harrah said:
Also, #5754.

@scabug
Copy link
Author

scabug commented Jan 15, 2013

@adriaanm said:
Are we really planning to fix this in 2.10.1? What's the plan?

@scabug
Copy link
Author

scabug commented Jan 15, 2013

@xeno-by said:
That was one of the bugs Mark mentioned back then in an email about annoying macro issues. I was intending to give it a second look and then either close it or fix it by 2.10.1.

@scabug
Copy link
Author

scabug commented Jan 15, 2013

@harrah said:
Although I think it would make maintaining and reading the code I have now easier, this one isn't a blocker for me and I'd be ok with this being fixed in 2.11.

#6539 (implemented, need it in a release), #6812, and #6187 are my blockers.

@scabug
Copy link
Author

scabug commented Feb 7, 2013

@xeno-by said:
scala/scala#2084

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants