ghc-9.10.3: The GHC API

Safe Haskell | None
Language | GHC2021

GHC.Driver.Pipeline.LogQueue

Synopsis

- data LogQueue = LogQueue {
  - logQueueId :: !Int
  - logQueueMessages :: !(IORef [Maybe (MessageClass, SrcSpan, SDoc, LogFlags)])
  - logQueueSemaphore :: !(MVar ())
  }
- newLogQueue :: Int -> IO LogQueue
- finishLogQueue :: LogQueue -> IO ()
- writeLogQueue :: LogQueue -> (MessageClass, SrcSpan, SDoc, LogFlags) -> IO ()
- parLogAction :: LogQueue -> LogAction
- data LogQueueQueue = LogQueueQueue Int (IntMap LogQueue)
- initLogQueue :: TVar LogQueueQueue -> LogQueue -> STM ()
- allLogQueues :: LogQueueQueue -> [LogQueue]
- newLogQueueQueue :: LogQueueQueue
- logThread :: Logger -> TVar Bool -> TVar LogQueueQueue -> IO (IO ())

# Documentation

data LogQueue Source #

Each module is given a unique `LogQueue` to redirect compilation messages to. A `Nothing` value contains the result of compilation, and denotes the end of the message queue.

Constructors

LogQueue |

Fields

- logQueueId :: !Int
- logQueueMessages :: !(IORef [Maybe (MessageClass, SrcSpan, SDoc, LogFlags)])
- logQueueSemaphore :: !(MVar ())

newLogQueue :: Int -> IO LogQueue Source #

finishLogQueue :: LogQueue -> IO () Source #

writeLogQueue :: LogQueue -> (MessageClass, SrcSpan, SDoc, LogFlags) -> IO () Source #

parLogAction :: LogQueue -> LogAction Source #

data LogQueueQueue Source #

Constructors

LogQueueQueue Int (IntMap LogQueue) |

initLogQueue :: TVar LogQueueQueue -> LogQueue -> STM () Source #

allLogQueues :: LogQueueQueue -> [LogQueue] Source #

Return all items in the queue in ascending order

newLogQueueQueue :: LogQueueQueue Source #

logThread :: Logger -> TVar Bool -> TVar LogQueueQueue -> IO (IO ()) Source #