-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Live visualization of data structures in GHCi -- -- Visualize live data structures in GHCi. Evaluation is not forced and -- you can interact with the visualized data structures. This allows -- seeing Haskell's lazy evaluation and sharing in action. -- -- See http://felsin9.de/nnis/ghc-vis/#basic-usage for the basic -- usage of ghc-vis or watch a short video demonstrating how it can be -- used with GHCi's debugger: -- http://felsin9.de/nnis/ghc-vis/#combined-debugger @package ghc-vis @version 0.7 module GHC.Vis.Internal -- | Parse a closure to a list of VisObjects parseClosure :: HeapGraphIndex -> PrintState [VisObject] -- | Textual representation of Heap objects, used in the graph -- visualization. showClosureFields :: GenClosure t -> [String] instance Eq Box -- | Although ghc-vis is meant to be used in GHCi it can also be used as a -- library in regular Haskell programs which are run or compiled by GHC. -- You can run those programs using "runghc example.hs" or "ghc -threaded -- example.hs && ./example". Without the "-threaded"-Flag ghc-vis -- does not work correctly. This is an example using ghc-vis outside of -- GHCi: -- --
-- import GHC.Vis -- -- main = do -- putStrLn "Start" -- let a = "teeest" -- let b = [1..3] -- let c = b ++ b -- let d = [1..] -- putStrLn $ show $ d !! 1 -- -- visualization -- view a "a" -- view b "b" -- view c "c" -- view d "d" -- -- getChar -- switch -- -- getChar -- putStrLn "End" --module GHC.Vis -- | This is the main function. It's to be called from GHCi and launches a -- graphical window in a new thread. vis :: IO () -- | A minimalistic version of ghc-vis, without window decorations, help -- and all that other stuff. mvis :: IO () -- | Add expressions with a name to the visualization window. view :: a -> String -> IO () -- | Evaluate an object that is shown in the visualization. (Names start -- with t) eval :: String -> IO () -- | Switch between the list view and the graph view switch :: IO () -- | When an object is updated by accessing it, you have to call this to -- refresh the visualization window. You can also click on an object to -- force an update. update :: IO () -- | Clear the visualization window, removing all expressions from it. clear :: IO () -- | Reset the hidden boxes restore :: IO () -- | Change position in history history :: (Int -> Int) -> IO () -- | Export the current visualization view to a file, format depends on the -- file ending. Currently supported: svg, png, pdf, ps export :: String -> IO ()