@@ -79,28 +79,29 @@ import Data.Semigroup ((<>))
7979-- 5. Shutdown vty.
8080--
8181-- Operations on Vty handles are not thread-safe.
82−data Vty = Vty
83− { -- | Outputs the given 'Picture'.
84− update :: Picture -> IO ()
85− -- | Return the next 'Event' or block until one becomes available.
86− , nextEvent :: IO Event
87− -- | Non-blocking version of 'nextEvent'.
88− , nextEventNonblocking :: IO (Maybe Event)
89− -- | The input interface. See 'Input'.
90− , inputIface :: Input
91− -- | The output interface. See 'Output'.
92− , outputIface :: Output
93− -- | Refresh the display. If other programs output to the terminal
94− -- and mess up the display then the application might want to
95− -- force a refresh using this function.
96− , refresh :: IO ()
97− -- | Clean up after vty. A call to this function is necessary to
98− -- cleanly restore the terminal state before application exit. The
99− -- above methods will throw an exception if executed after this is
100− -- executed. Idempotent.
101− , shutdown :: IO ()
102− , isShutdown :: IO Bool
103− }
82+data Vty =
83+ Vty { update :: Picture -> IO ()
84+ -- ^ Outputs the given 'Picture'.
85+ , nextEvent :: IO Event
86+ -- ^ Return the next 'Event' or block until one becomes
87+ -- available.
88+ , nextEventNonblocking :: IO (Maybe Event)
89+ -- ^ Non-blocking version of 'nextEvent'.
90+ , inputIface :: Input
91+ -- ^ The input interface. See 'Input'.
92+ , outputIface :: Output
93+ -- ^ The output interface. See 'Output'.
94+ , refresh :: IO ()
95+ -- ^ Refresh the display. If other programs output to the
96+ -- terminal and mess up the display then the application might
97+ -- want to force a refresh using this function.
98+ , shutdown :: IO ()
99+ -- ^ Clean up after vty. A call to this function is necessary to
100+ -- cleanly restore the terminal state before application exit.
101+ -- The above methods will throw an exception if executed after
102+ -- this is executed. Idempotent.
103+ , isShutdown :: IO Bool
104+ }
104105
105106-- | Create a Vty handle. At most one handle should be created at a time
106107-- for a given terminal device.