[Haskell-cafe] Haskell type declaration summary

Andrew Butterfield Andrew.Butterfield at scss.tcd.ie
Thu May 4 16:34:35 UTC 2017


Dear Brandon,
 thanks for that - the echo :browse solution is ideal because I can easily write a short Haskell program
to filter out the type declarations from the output.
In fact it becomes easy to extract other kinds of declarations as well.

Here the offside rule really is my friend.

I'll post a fully worked solution once I build it.

Thanks, Andrew

> On 4 May 2017, at 17:22, Brandon Allbery <allbery.b at gmail.com> wrote:
> 
> From source you'd be looking at using haskell-src-exts. Alternately:
> 
> - echo :browse | ghci foo.hs
> 
> - compile it, dump the .hi file (ghc --show-iface foo.hi) likely with postprocessing to only show the types
> 
> On Thu, May 4, 2017 at 3:30 AM, Andrew Butterfield <Andrew.Butterfield at scss.tcd.ie <mailto:Andrew.Butterfield at scss.tcd.ie>> wrote:
> Dear Haskellers,
>  any quick and easy way to extract all the type declarations from a Haskell source file?
> (for easy reference)
> 
> Regards,
> 
> Andrew Butterfield
> School of Computer Science & Statistics
> Trinity College
> Dublin 2, Ireland
> 
> _______________________________________________
> Haskell-Cafe mailing list
> To (un)subscribe, modify options or view archives go to:
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe <http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe>
> Only members subscribed via the mailman list are allowed to post.
> 
> 
> 
> -- 
> brandon s allbery kf8nh                               sine nomine associates
> allbery.b at gmail.com <mailto:allbery.b at gmail.com>                                  ballbery at sinenomine.net <mailto:ballbery at sinenomine.net>
> unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net <http://sinenomine.net/>
Andrew Butterfield
School of Computer Science & Statistics
Trinity College
Dublin 2, Ireland

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20170504/a9ee59df/attachment.html>


More information about the Haskell-Cafe mailing list