Recover role of a type variable in source Haskell
Ryan Scott
ryan.gl.scott at gmail.com
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.
-----
[1]
https://hackage.haskell.org/package/template-haskell-2.14.0.0/docs/Language-Haskell-TH.html#v:reifyRoles
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20190407/a536d84f/attachment.html>
More information about the ghc-devs
mailing list