mirror of
https://github.com/jtdaugherty/brick.git
synced 2024-09-11 15:55:54 +03:00
add instance MonadMask (EventM n)
This commit is contained in:
parent
8bfff26b39
commit
dde8ccf5df
@ -118,6 +118,7 @@ library
|
||||
data-clist >= 0.1,
|
||||
directory >= 1.2.5.0,
|
||||
dlist,
|
||||
exceptions >= 0.10.0,
|
||||
filepath,
|
||||
containers >= 0.5.7,
|
||||
microlens >= 0.3.0.0,
|
||||
|
@ -88,6 +88,7 @@ import Data.Monoid (Monoid(..))
|
||||
|
||||
import Lens.Micro (_1, _2, to, (^.), (&), (.~), Lens')
|
||||
import Lens.Micro.Type (Getting)
|
||||
import Control.Monad.Catch (MonadThrow, MonadCatch, MonadMask)
|
||||
import Control.Monad.Trans.State.Lazy
|
||||
import Control.Monad.Trans.Reader
|
||||
import Graphics.Vty (Attr)
|
||||
@ -128,7 +129,10 @@ handleEventLensed v target handleEvent ev = do
|
||||
newtype EventM n a =
|
||||
EventM { runEventM :: ReaderT (EventRO n) (StateT (EventState n) IO) a
|
||||
}
|
||||
deriving (Functor, Applicative, Monad, MonadIO)
|
||||
deriving
|
||||
( Functor, Applicative, Monad, MonadIO
|
||||
, MonadThrow, MonadCatch, MonadMask
|
||||
)
|
||||
|
||||
-- | Widget size policies. These policies communicate how a widget uses
|
||||
-- space when being rendered. These policies influence rendering order
|
||||
|
Loading…
Reference in New Issue
Block a user