Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- publishResult :: (Message -> IO ()) -> MessageHeader -> MVar [Display] -> MVar Bool -> MVar [DisplayData] -> Bool -> EvaluationResult -> ErrorOccurred -> IO ()
Documentation
:: (Message -> IO ()) | A function to send messages |
-> MessageHeader | Message header to use for reply |
-> MVar [Display] | A MVar to use for displays |
-> MVar Bool | A mutable boolean to decide whether the output need to be cleared and redrawn |
-> MVar [DisplayData] | A MVar to use for storing pager output |
-> Bool | Whether to use the pager |
-> EvaluationResult | The evaluation result |
-> ErrorOccurred | Whether evaluation completed successfully |
-> IO () |
Publish evaluation results, ignore any CommMsgs. This function can be used to create a function of type (EvaluationResult -> IO ()), which can be used to publish results to the frontend. The resultant function shares some state between different calls by storing it inside the MVars passed while creating it using this function. Pager output is accumulated in the MVar passed for this purpose if a pager is being used (indicated by an argument), and sent to the frontend otherwise.