[Haskell-cafe] Retrieving information about type families

Niklas Haas haskell at nand.wakku.to
Thu Jul 24 00:03:18 UTC 2014

On Wed, 23 Jul 2014 20:48:06 +0200, Alejandro Serrano Mena <trupill at gmail.com> wrote:
> Dear Café,
> My quest for obtaining information about type families continues.
> Now I have a simple question: how should I access the information about
> "type instance"s via the GHC API? My aim is to do so after type checking,
> that is, to get that information from a TypecheckedModule. However, I
> haven't yet been able to touch the right buttons to make it work ;(
> Thanks in advance,
> Alejandro

In Haddock we get this information out of md_fam_insts, which you can
get out of ModDetails - we access this from a TypecheckedModule using
tm_internals_. I'm not sure if there's a cleaner way, but I couldn't
find one and this seems to work.

More information about the Haskell-Cafe mailing list