From 4e5590d148a7f2b517dce18c231b9d4cb0b1d19f Mon Sep 17 00:00:00 2001 From: tomsmeding Date: Mon, 19 Aug 2019 13:00:05 +0200 Subject: Import of source files --- src/System/IO/Terminal.hs | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 src/System/IO/Terminal.hs (limited to 'src/System/IO/Terminal.hs') diff --git a/src/System/IO/Terminal.hs b/src/System/IO/Terminal.hs new file mode 100644 index 0000000..0846d9f --- /dev/null +++ b/src/System/IO/Terminal.hs @@ -0,0 +1,31 @@ +{-| +Module : System.IO.Terminal +Copyright : (c) UU, 2019 +License : MIT +Maintainer : Tom Smeding +Stability : experimental +Portability : POSIX, macOS, Windows + +Top-level module for building an application using terminal I/O. + +The library is loosely modelled after the [termio](https://github.com/tomsmeding/termio) +library for C. See the documentation of the re-exported modules for more +information. +-} +module System.IO.Terminal + (module System.IO.Terminal.Input + ,module System.IO.Terminal.Render + ,TUI, withTUI) + where + +import Control.Monad.Trans +import System.IO.Terminal.Input +import System.IO.Terminal.Render + + +-- | The monad for doing terminal I/O operations. +type TUI = RenderT Input + +-- | Run a 'TUI' computation in the 'IO' monad. +withTUI :: TUI a -> IO a +withTUI = withInput . withRender -- cgit v1.2.3-70-g09d2