:def vis \_ -> return $ "GHC.Vis.visualization" :def view \x -> return $ "GHC.Vis.view (" ++ x ++ ") " ++ show x :def eval \x -> return $ "GHC.Vis.eval \"" ++ x ++ "\"" :def switch \_ -> return $ "GHC.Vis.switch" :def update \_ -> return $ "GHC.Vis.update" :def clear \_ -> return $ "GHC.Vis.clear" :def export \x -> return $ "GHC.Vis.export " ++ show x -- Evaluate one step and update values in ghc-vis :def su \x -> return $ ":step " ++ x ++ "\n:update" -- Continue to next breakpoint and update values in ghc-vis :def cu \_ -> return $ ":continue\n:update" -- Keep evaluating and updating on any key pressed, quit with q :def asu \x -> getChar >>= \c -> case c of { 'q' -> return ""; _ -> return $ ":step " ++ x ++ "\n:update\n:asu" } -- Evaluate one step every second until any key is pressed :def tsu \x -> (System.Timeout.timeout 1000000 getChar) >>= \c -> case c of { Just _ -> return ""; _ -> return $ ":step " ++ x ++ "\n:update\n:tsu" }