From fa515a7041bfc4ea27989a5998eb6138867dc76a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Sun, 15 Nov 2026 21:55:04 +0100 Subject: Types for AnnotatedStatus and ManagedJobStatus --- src/Command/Run.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Command') diff --git a/src/Command/Run.hs b/src/Command/Run.hs index 72dd4e2..769d2d9 100644 --- a/src/Command/Run.hs +++ b/src/Command/Run.hs @@ -438,7 +438,7 @@ fitToLength maxlen str | len <= maxlen = str <> T.replicate (maxlen - len) " " | otherwise = T.take (maxlen - 1) str <> "…" where len = T.length str -showStatus :: Int -> Bool -> ( JobStatus a, [ OutputFootnote ] ) -> Text +showStatus :: Int -> Bool -> AnnotatedStatus -> Text showStatus width blink ( status, fnotes ) = case status of JobQueued -> " \ESC[94m…\ESC[0m" <> showNotes (width - 2) JobWaiting uses -> "\ESC[94m~" <> fitToLength (width - 1) (T.intercalate "," (map textJobName uses) <> showNotes (width - 1)) <> "\ESC[0m" @@ -463,7 +463,7 @@ showStatus width blink ( status, fnotes ) = case status of showNotes w = fitToLength w $ T.concat $ " " : map showNote fnotes showNote fnote = "[" <> T.pack (maybe "?" (show . tfNumber) (footnoteTerminal fnote)) <> "]" -displayStatusLine :: TerminalOutput -> TerminalLine -> Text -> Text -> [ Maybe (STM ( JobStatus JobOutput, [ OutputFootnote ] )) ] -> IO () +displayStatusLine :: TerminalOutput -> TerminalLine -> Text -> Text -> [ Maybe (STM AnnotatedStatus) ] -> IO () displayStatusLine tout line prefix1 prefix2 statuses = do go "\0" where @@ -484,7 +484,7 @@ displayStatusLine tout line prefix1 prefix2 statuses = do then return () else go cur -waitForJobStatuses :: [ Maybe (STM ( JobStatus a, [ OutputFootnote ] )) ] -> IO () +waitForJobStatuses :: [ Maybe (STM AnnotatedStatus) ] -> IO () waitForJobStatuses mbstatuses = do let statuses = catMaybes mbstatuses atomically $ do -- cgit v1.2.3