Created
August 28, 2017 16:31
-
-
Save fommil/0bf0b1b3ce231b5c5cebf67f07a07007 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val `shapeless.LabelledGeneric` = { | |
def `shapeless.LabelledGeneric.Aux` = scala.Predef.??? | |
shapeless.LabelledGeneric[Bar] | |
} | |
implicit val `shapeless.LabelledGeneric.Aux` | |
: shapeless.LabelledGeneric.Aux[Bar, `shapeless.LabelledGeneric`.Repr] = | |
`shapeless.LabelledGeneric` | |
.... | |
val dependent = ValDef( | |
Modifiers(), | |
TermName("shapeless.LabelledGeneric").encodedName.toTermName, | |
TypeTree(), | |
Block( | |
List( | |
DefDef( | |
Modifiers(), | |
TermName("shapeless.LabelledGeneric.Aux").encodedName.toTermName, | |
Nil, | |
Nil, | |
TypeTree(), | |
Select(Select(Ident(TermName("scala")), TermName("Predef")), | |
TermName("???").encodedName.toTermName) | |
) | |
), | |
TypeApply(Select(Ident(TermName("shapeless")), | |
TermName("LabelledGeneric")), | |
List(Ident(TypeName("Bar")))) | |
) | |
) | |
val aux = ValDef( | |
Modifiers(Flag.IMPLICIT), | |
TermName("shapeless.LabelledGeneric.Aux").encodedName.toTermName, | |
AppliedTypeTree( | |
Select(Select(Ident(TermName("shapeless")), | |
TermName("LabelledGeneric")), | |
TypeName("Aux")), | |
List( | |
Ident(TypeName("Bar")), | |
Select( | |
Ident(TermName("shapeless.LabelledGeneric").encodedName.toTermName), | |
TypeName("Repr") | |
) | |
) | |
), | |
Ident(TermName("shapeless.LabelledGeneric").encodedName.toTermName) | |
) | |
Block(List(dependent), aux) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment