Macros question! If I have a type constructor, say List[_], and a concrete type, say List[Int], is there a convenient API for unifying the types to extract the wrapped type, Int? My current hack is to typecheck a mock expression and inspect the inferred parameter types.
-
-
Replying to @propensive
If you’re after the instantiation of `clazz` `List`’s type params given the fully applied type `tp`, use `tp.baseType(clazz).typeArgs`. They will line up with `clazz.typeParams`. No inference/type checking required
1 reply 0 retweets 4 likes
Replying to @adriaanm
Sounds like a nicer solution, and I feel a bit dumb now, because that's exactly what I did to get GADTs working in Magnolia about two weeks ago... 
1:10 PM - 15 Nov 2017
from San Francisco, CA
0 replies
0 retweets
1 like
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.