<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Dear Brandon,<div class=""> thanks for that - the echo :browse solution is ideal because I can easily write a short Haskell program</div><div class="">to filter out the type declarations from the output.</div><div class="">In fact it becomes easy to extract other kinds of declarations as well.</div><div class=""><br class=""></div><div class="">Here the offside rule really is my friend.</div><div class=""><br class=""></div><div class="">I'll post a fully worked solution once I build it.</div><div class=""><br class=""></div><div class="">Thanks, Andrew</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 4 May 2017, at 17:22, Brandon Allbery <<a href="mailto:allbery.b@gmail.com" class="">allbery.b@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">From source you'd be looking at using haskell-src-exts. Alternately:<div class=""><br class=""></div><div class="">- echo :browse | ghci foo.hs</div><div class=""><br class=""></div><div class="">- compile it, dump the .hi file (ghc --show-iface foo.hi) likely with postprocessing to only show the types</div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Thu, May 4, 2017 at 3:30 AM, Andrew Butterfield <span dir="ltr" class=""><<a href="mailto:Andrew.Butterfield@scss.tcd.ie" target="_blank" class="">Andrew.Butterfield@scss.tcd.ie</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear Haskellers,<br class="">
 any quick and easy way to extract all the type declarations from a Haskell source file?<br class="">
(for easy reference)<br class="">
<br class="">
Regards,<br class="">
<br class="">
Andrew Butterfield<br class="">
School of Computer Science & Statistics<br class="">
Trinity College<br class="">
Dublin 2, Ireland<br class="">
<br class="">
______________________________<wbr class="">_________________<br class="">
Haskell-Cafe mailing list<br class="">
To (un)subscribe, modify options or view archives go to:<br class="">
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank" class="">http://mail.haskell.org/cgi-<wbr class="">bin/mailman/listinfo/haskell-<wbr class="">cafe</a><br class="">
Only members subscribed via the mailman list are allowed to post.</blockquote></div><br class=""><br clear="all" class=""><div class=""><br class=""></div>-- <br class=""><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr" class=""><div class="">brandon s allbery kf8nh                               sine nomine associates</div><div class=""><a href="mailto:allbery.b@gmail.com" target="_blank" class="">allbery.b@gmail.com</a>                                  <a href="mailto:ballbery@sinenomine.net" target="_blank" class="">ballbery@sinenomine.net</a></div><div class="">unix, openafs, kerberos, infrastructure, xmonad        <a href="http://sinenomine.net/" target="_blank" class="">http://sinenomine.net</a></div></div></div>
</div>
</div></blockquote></div><br class=""><div class="">
<div class=""><div class="">Andrew Butterfield</div><div class="">School of Computer Science & Statistics</div><div class="">Trinity College</div><div class="">Dublin 2, Ireland</div></div>

</div>
<br class=""></div></body></html>