<div dir="ltr"><div dir="ltr"><div>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.</div><div><br></div><div>I'm not aware of another way to accomplish this (without resorting to something like the GHC API).</div><div><br></div><div>Ryan S.</div><div>-----</div><div>[1] <a href="https://hackage.haskell.org/package/template-haskell-2.14.0.0/docs/Language-Haskell-TH.html#v:reifyRoles">https://hackage.haskell.org/package/template-haskell-2.14.0.0/docs/Language-Haskell-TH.html#v:reifyRoles</a><br></div></div></div>