Analyzing Haskell call graph (was: Thread on Discourse - HIE file processing)
Tristan Cacqueray
tdecacqu at redhat.com
Thu Aug 10 17:51:41 UTC 2023
Hi Sylvain,
Using the output of the renamer looks good. However it doesn't seem like
it contains the typeclass instances: when calling a typeclass method for
a given type, the AST contains the name of the method and the type, but
not the instance. Is it complicated to lookup the relevant instance
from the renamer output?
Thanks,
-Tristan
On Wed, Aug 09, 2023 at 21:36 Sylvain Henry wrote:
> Hi Tristan,
>
> I wouldn't do this with Core (cf inlining issue and issue associating what you find with source syntax).
>
> I think you should use the output of the renamer instead. Either with a GHC plugin using `renamedResultAction` or just by dumping the renamed AST (fully qualified) with -ddump-rn-ast -ddump-to-file and grepping for the names you want.
>
> Cheers,
> Sylvain
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 515 bytes
Desc: not available
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20230810/ec7177b1/attachment.sig>
More information about the ghc-devs
mailing list