import Graphics.XHB.Requests class Monad x => XContext x where request :: Request a => a -> Connection -> x () requestWithReply :: RequestWithReply a b => a -> Connection -> x (x (Either SomeError b)) waitEvent :: Connection -> x SomeEvent pollEvent :: Connection -> x (Maybe SomeEvent) class (XContext x, Monad m) => MonadX x m | m -> x where liftX :: x a -> m a askX :: m Connection catchErrorX :: m a -> (SomeError -> m a) -> m a throwErrorX :: SomeError -> m a
In addition, it includes an
instance XContext IO, monad transformer instanaces, and some convenient types and operations.
Its purpose is to allow for pure X logic.
This article describes this package and some of its friends in detail.
Haddock can be found here.