From 3efea93b4b5d32722abb75fcbf1728571da52ac8 Mon Sep 17 00:00:00 2001 From: Tim Emiola Date: Wed, 17 Jan 2024 08:38:34 +0900 Subject: [PATCH] Fix an example in the README.md --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c307c4a..c7a8101 100644 --- a/README.md +++ b/README.md @@ -176,10 +176,10 @@ main :: IO () main = showUsageOf 96334 -- replace with your own process ID ``` -#### Example: periodically check the memory of a processes +#### Example: periodically check the memory of some processes ```haskell -import Data.List.NonEmpty (NonEmpty) +import Data.List.NonEmpty (NonEmpty, (:|)) import System.MemInfo ( mkReportBud, printUsage, @@ -187,7 +187,7 @@ import System.MemInfo ( ProcessID ) --- | Use 'unfoldMemUsageAfter' to periodically read the memory usage +-- | Use 'unfoldMemUsageAfter' to periodically read memory usage monitorRamOf :: NonEmpty ProcessID -> IO () monitorRamOf pids = do budMb <- mkReportBud pids @@ -203,7 +203,7 @@ monitorRamOf pids = do go bud main :: IO () -main = monitorRamOf 96334 -- replace with your own process ID +main = monitorRamOf $ 96334 :| [96335]-- replace with your own process IDs ```