On 13/09/2012 11:58, Kyle Hanson wrote:
What I would like to do is take a source file, and then parse it for
function names.

What I have come up with so far is to to use the GHC API to get the
typedcheckedSource (basically of the Wiki of using GHC as an API) which
then I get something that looks like this (in hpaste for readability)

http://hpaste.org/74679

So my current thinking is that I take this and then parse out the
functions by making a regex.

A better way would be to traverse the HsSyn that you get from the GHC API to collect the function names.

Cheers,
        Simon


_______________________________________________
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to