2{-# LANGUAGE DefaultSignatures #-}
3{-# LANGUAGE MultiParamTypeClasses #-}
4{-# LANGUAGE FunctionalDependencies #-}
5{-# LANGUAGE TypeFamilies #-}
6{-# LANGUAGE FlexibleInstances #-}
7{-# LANGUAGE UndecidableInstances #-}
8#ifdef USE_REFLEX_OPTIMIZER
9{-# OPTIONS_GHC -fplugin=Reflex.Optimizer #-}
11module Reflex.NotReady.Class
15import Control.Monad.Trans
16import Control.Monad.Reader (ReaderT)
19import Reflex.Host.Class
20import Reflex.PostBuild.Base (PostBuildT)
21import Reflex.EventWriter.Base (EventWriterT)
22import Reflex.DynamicWriter.Base (DynamicWriterT)
23import Reflex.Query.Base (QueryT)
24import Reflex.Requester.Base (RequesterT)
25import Reflex.PerformEvent.Base (PerformEventT(..))
26import Reflex.TriggerEvent.Base (TriggerEventT)
28class Monad m => NotReady t m | m -> t where
29 notReadyUntil :: Event t a -> m ()
30 default notReadyUntil :: (MonadTrans f, m ~ f m', NotReady t m') => Event t a -> m ()
31 notReadyUntil = lift . notReadyUntil
34 default notReady :: (MonadTrans f, m ~ f m', NotReady t m') => m ()
35 notReady = lift notReady
37instance NotReady t m => NotReady t (ReaderT r m) where
38 notReadyUntil = lift . notReadyUntil
39 notReady = lift notReady
41instance NotReady t m => NotReady t (PostBuildT t m) where
42 notReadyUntil = lift . notReadyUntil
43 notReady = lift notReady
45instance NotReady t m => NotReady t (EventWriterT t w m) where
46 notReadyUntil = lift . notReadyUntil
47 notReady = lift notReady
49instance NotReady t m => NotReady t (DynamicWriterT t w m) where
50 notReadyUntil = lift . notReadyUntil
51 notReady = lift notReady
53instance NotReady t m => NotReady t (QueryT t q m) where
54 notReadyUntil = lift . notReadyUntil
55 notReady = lift notReady
57instance (ReflexHost t, NotReady t (HostFrame t)) => NotReady t (PerformEventT t m) where
58 notReadyUntil = PerformEventT . notReadyUntil
59 notReady = PerformEventT notReady
61instance NotReady t m => NotReady t (RequesterT t request response m) where
62 notReadyUntil = lift . notReadyUntil
63 notReady = lift notReady
65instance NotReady t m => NotReady t (TriggerEventT t m) where
66 notReadyUntil = lift . notReadyUntil
67 notReady = lift notReady
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list