reflex-vty- Reflex FRP host and widgets for VTY applications

Safe HaskellNone





type VtyApp t m Source #


 = MonadVtyApp t m 
=> DisplayRegion

The initial display size (updates to this come as events)

-> Event t Event

Vty input events.

-> m (VtyResult t)

The output of the VtyApp. The application runs in a context that, among other things, allows new events to be created and triggered (TriggerEvent), provides access to an event that fires immediately upon app instantiation (PostBuild), and allows actions to be run upon occurrences of events (PerformEvent).

A functional reactive vty application.

data VtyResult t Source #

The output of a VtyApp.




getDefaultVty :: IO Vty Source #

Returns the standard vty configuration with mouse mode enabled.

runVtyApp :: (forall t m. VtyApp t m) -> IO () Source #

Run a VtyApp with a Vty handle with a standard configuration.

runVtyAppWithHandle Source #


:: Vty

A Vty handle.

-> (forall t m. VtyApp t m)

A functional reactive vty application.

-> IO () 

Runs a VtyApp in a given Vty.

type MonadVtyApp t m = (Reflex t, MonadHold t m, MonadFix m, PrimMonad (HostFrame t), ReflexHost t, MonadIO (HostFrame t), Ref m ~ IORef, Ref (HostFrame t) ~ IORef, MonadRef (HostFrame t), NotReady t m, TriggerEvent t m, PostBuild t m, PerformEvent t m, MonadIO m, MonadIO (Performable m), Adjustable t m) Source #

The constraints necessary to run a VtyApp. See runVtyAppWithHandle for more on why each of these are necessary and how they can be fulfilled.

type VtyEvent = Event Source #

A synonym for the underlying vty event type from Vty. This should probably ultimately be replaced by something defined in this library.