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 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 scabug commented Jul 20, 2012

Loading

@scabug
Copy link
Author

@scabug 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.

Loading

@scabug
Copy link
Author

@scabug scabug commented Jul 20, 2012

Loading

@scabug
Copy link
Author

@scabug scabug commented Jul 20, 2012

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

Loading

@scabug
Copy link
Author

@scabug scabug commented Jul 20, 2012

@harrah said:
Also, #5754.

Loading

@scabug
Copy link
Author

@scabug scabug commented Jan 15, 2013

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

Loading

@scabug
Copy link
Author

@scabug 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.

Loading

@scabug
Copy link
Author

@scabug 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.

Loading

@scabug
Copy link
Author

@scabug scabug commented Feb 7, 2013

Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants