From 7687ddd2775d873dc67b243efda981510797549a Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 28 Jul 2014 14:03:00 +0200 Subject: :s -> getGCStats --- Main.hs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Main.hs b/Main.hs index 36d066d..a055950 100644 --- a/Main.hs +++ b/Main.hs @@ -15,6 +15,8 @@ import System.IO import System.Locale (defaultTimeLocale, rfc822DateFormat) --import System.Posix.Signals +import GHC.Stats (getGCStats) + import Control.Monad.Error import Control.Monad.Reader import Control.Monad.State @@ -228,6 +230,9 @@ execCommand ExecuteInputBuffer = do st <- get case showBuffer (buffer st) of + ":s" -> do + s <- liftIO getGCStats + tell [ show s ] '!' : cmdline -> do --tell [ "spawn: " ++ cmdline ] -- "input: <" ++ (concat $ map (reform 32) $ showBuffer b) ++ ">" ] -- cgit v1.2.3