Recover role of a type variable in source Haskell

Ryan Scott at
Sun Apr 7 21:10:46 UTC 2019

It depends on what you mean by "source Haskell". If you're willing to
consider including Template Haskell in your definition of "source", then
the answer is yes, since there is a reifyRoles function [1] which gives you
this information.

I'm not aware of another way to accomplish this (without resorting to
something like the GHC API).

Ryan S.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the ghc-devs mailing list