mirror of
https://github.com/ilyakooo0/reflex-vty.git
synced 2024-11-23 11:26:37 +03:00
Add NotReady
This commit is contained in:
parent
e387279b7b
commit
ebff8c65d0
@ -12,6 +12,7 @@ cabal-version: >=1.10
|
||||
|
||||
library
|
||||
exposed-modules: Reflex.Vty
|
||||
other-modules: Reflex.Spider.Orphans
|
||||
build-depends:
|
||||
base,
|
||||
dependent-sum,
|
||||
|
17
src/Reflex/Spider/Orphans.hs
Normal file
17
src/Reflex/Spider/Orphans.hs
Normal file
@ -0,0 +1,17 @@
|
||||
{-# LANGUAGE FlexibleInstances #-}
|
||||
{-# LANGUAGE MultiParamTypeClasses #-}
|
||||
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
||||
module Reflex.Spider.Orphans where
|
||||
|
||||
import Reflex
|
||||
import Reflex.NotReady.Class
|
||||
import Reflex.Spider.Internal
|
||||
|
||||
-- TODO move this to reflex
|
||||
instance NotReady (SpiderTimeline x) (SpiderHost x) where
|
||||
notReadyUntil _ = pure ()
|
||||
notReady = pure ()
|
||||
|
||||
instance HasSpiderTimeline x => NotReady (SpiderTimeline x) (PerformEventT (SpiderTimeline x) (SpiderHost x)) where
|
||||
notReadyUntil _ = pure ()
|
||||
notReady = pure ()
|
@ -1,4 +1,5 @@
|
||||
{-# LANGUAGE FlexibleContexts #-}
|
||||
{-# LANGUAGE FlexibleInstances #-}
|
||||
{-# LANGUAGE LambdaCase #-}
|
||||
{-# LANGUAGE MultiParamTypeClasses #-}
|
||||
{-# LANGUAGE RankNTypes #-}
|
||||
@ -27,6 +28,8 @@ import Data.Maybe (catMaybes)
|
||||
|
||||
import Reflex
|
||||
import Reflex.Host.Class
|
||||
import Reflex.NotReady.Class
|
||||
import Reflex.Spider.Orphans ()
|
||||
import qualified Graphics.Vty as V
|
||||
|
||||
-- | The output of a 'VtyApp'.
|
||||
@ -49,6 +52,7 @@ type VtyApp t m =
|
||||
, Ref m ~ IORef
|
||||
, Ref (HostFrame t) ~ IORef
|
||||
, MonadRef (HostFrame t)
|
||||
, NotReady t (PerformEventT t m)
|
||||
)
|
||||
=> Event t (V.Event)
|
||||
-- ^ Vty input events.
|
||||
|
Loading…
Reference in New Issue
Block a user