[Haskell-cafe] GHC API - list all exports of a module
Alan & Kim Zimmerman
alan.zimm at gmail.com
Mon Feb 2 12:30:52 UTC 2015
Also, prior to GHC 7.10, there are serious gotchas to processing the GHC
API Parsed Source, as certain fields are initialised to a `panic "xxx"`
value, and should never be accessed.
On Mon, Feb 2, 2015 at 1:55 PM, Erik Hesselink <hesselink at gmail.com> wrote:
> On Mon, Feb 2, 2015 at 12:46 PM, Jochen Keil <jochen.keil at gmail.com>
> > Hello Peter,
> > On 02.02.2015 12:31, Peter Simons wrote:
> >> Hi Jochen,
> >> > My main goal would be to have a program which takes two modules of
> >> > different versions, compare them and highlight the differences
> >> > between them.
> >> maybe http://hackage.haskell.org/package/hackage-diff would work for
> >> your purposes?
> > Thanks for the hint, this looks pretty good.
> > One thing though: hackage-diff uses haskell-src-exts for parsing
> > modules. Does haskell-src-exts re-use the GHC API or does it run its own
> > parser? (from a quick glance I'd say the latter case)
> There are basically two routes to choose from with such a tool (of
> which a few already exist, I think): you can use GHC and its API, like
> you're doing, or you can use haskell-src-exts, which is a separate
> parser, and use haskell-names for name resolution (and
> haskell-packages for dependency information). Sadly there's no
> haskell-type-exts for typechecking (yet). The GHC route is probably
> more powerful, the haskell-suite route is simpler and doesn't depend
> on GHC.
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe