Skip to content

Instantly share code, notes, and snippets.

@mgsloan
Last active December 20, 2015 04:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mgsloan/6068915 to your computer and use it in GitHub Desktop.
Save mgsloan/6068915 to your computer and use it in GitHub Desktop.
import GHC.Vacuum
import GHC.Vacuum.GraphViz
import Data.GraphViz
lazyVacuumToPng :: FilePath -> a -> IO FilePath
lazyVacuumToPng fp x = graphToDotFile fp Png $ nameGraph (vacuumLazy x)
main :: IO ()
main = do
lazyVacuumToPng "beforeForce" xs
print $ take 5 xs
lazyVacuumToPng "afterForce" xs
return ()
where
xs = [1..]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment