<div dir="ltr"><div>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.<br><br></div>Alan<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 2, 2015 at 1:55 PM, Erik Hesselink <span dir="ltr"><<a href="mailto:hesselink@gmail.com" target="_blank">hesselink@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Mon, Feb 2, 2015 at 12:46 PM, Jochen Keil <<a href="mailto:jochen.keil@gmail.com">jochen.keil@gmail.com</a>> wrote:<br>
> Hello Peter,<br>
><br>
> On 02.02.2015 12:31, Peter Simons wrote:<br>
>> Hi Jochen,<br>
>><br>
>>  > My main goal would be to have a program which takes two modules of<br>
>>  > different versions, compare them and highlight the differences<br>
>>  > between them.<br>
>><br>
>> maybe <a href="http://hackage.haskell.org/package/hackage-diff" target="_blank">http://hackage.haskell.org/package/hackage-diff</a> would work for<br>
>> your purposes?<br>
><br>
> Thanks for the hint, this looks pretty good.<br>
><br>
> One thing though: hackage-diff uses haskell-src-exts for parsing<br>
> modules. Does haskell-src-exts re-use the GHC API or does it run its own<br>
> parser? (from a quick glance I'd say the latter case)<br>
<br>
</div></div>There are basically two routes to choose from with such a tool (of<br>
which a few already exist, I think): you can use GHC and its API, like<br>
you're doing, or you can use haskell-src-exts, which is a separate<br>
parser, and use haskell-names for name resolution (and<br>
haskell-packages for dependency information). Sadly there's no<br>
haskell-type-exts for typechecking (yet). The GHC route is probably<br>
more powerful, the haskell-suite route is simpler and doesn't depend<br>
on GHC.<br>
<br>
Regards,<br>
<br>
Erik<br>
<div class="HOEnZb"><div class="h5">_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
</div></div></blockquote></div><br></div>