Fig is a Haskell package for parsing and manipulation of [Xfig files][1]. The package has a Cabal setup and can be installed this way: $ runhaskell Setup configure $ runhaskell Setup build $ sudo runhaskell Setup install You can use the package without doing an install by editing the `Main.hs` file to suit your needs and building the program with the following command: $ ghc --make Main.hs -o fig2fig Run the program with a FIG file as input and view the results: $ ./fig2fig < transitive.fig > out.fig $ xfig out.fig The package has a [home page][0] with more information on its use and a [HackageDB page][2] with all releases of the package. [0]: http://www.bergsoe.org/fig [1]: http://www.xfig.org/userman/fig-format.html [2]: http://hackage.haskell.org/package/fig