diff options
| author | Roman Smrž <roman.smrz@seznam.cz> | 2026-07-05 22:57:49 +0200 |
|---|---|---|
| committer | Roman Smrž <roman.smrz@seznam.cz> | 2026-07-09 19:45:40 +0200 |
| commit | 0b3b675bfc9e78ee563d526f17184e317a962ae8 (patch) | |
| tree | d88a9a768338435cdcc4d316902b3dba30dbb397 /src/Output.hs | |
| parent | 439481ad37868c732fa68fc31b65c581d0dcd7fa (diff) | |
Diffstat (limited to 'src/Output.hs')
| -rw-r--r-- | src/Output.hs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Output.hs b/src/Output.hs index e9ce718..293f598 100644 --- a/src/Output.hs +++ b/src/Output.hs @@ -3,6 +3,7 @@ module Output ( OutputType(..), OutputEvent(..), OutputFootnote(..), + MonadOutput(..), withOutput, outputTerminal, @@ -56,6 +57,10 @@ data OutputFootnote = OutputFootnote deriving (Eq) +class Monad m => MonadOutput m where + getOutput :: m Output + + withOutput :: [ OutputType ] -> (Output -> IO a) -> IO a withOutput types inner = do lock <- newMVar () |