Tool for minimizing examples

Ben Gamari ben at
Wed Oct 26 13:23:19 UTC 2016

Eric Crockett <ecrockett0 at> writes:

> Are there any tools out there that can do any portion of this process for
> me?

This is a good question. Unfortunately I don't know of any; I do my
minimizations by hand.

> Perhaps it is possible to output contents after the compiler does a DCE
> pass?
Unfortunately I don't believe this would be helpful as DCE isn't done on
the Haskell syntax tree representation and we have no external
representation of Core.

That being said, you might be able to write something without too much
difficulty using the GHC API. I have a small toy project that I once
used to explore the API; you might find that it's a useful place to
start [1].

Sorry for the not-so-helpful response!


- Ben

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 454 bytes
Desc: not available
URL: <>

More information about the ghc-devs mailing list