Recover role of a type variable in source Haskell
chessai1996 at gmail.com
Sun Apr 7 16:41:49 UTC 2019
Is it possible to programmatically recover the role of a type variable?
Or, possibly, a list of the roles of the type variables from left to right?
For example, if i have:
data Foo a = Foo (1)
newtype Bar a b = Bar (a -> b) (1)
Getting the role list of (1) would give me [Phantom], and (2) would give me
I know in compiler/types/TyCon.hs that TyCon has a list of Roles in it, but
there doesn't seem to be any machinery available to do this in source
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ghc-devs