5import Control.Monad.Ref
6import Data.Dependent.Sum
7import Data.Functor.Identity
10import Reflex.Host.Class
12runApp :: (Show a, t ~ SpiderTimeline Global, m ~ SpiderHost Global)
13 => (Event t () -> PerformEventT t m (Maybe (Ref m (Maybe (EventTrigger t ()))), Event t a))
14 -> IO (Maybe a, Maybe (a, a))
15runApp x = runSpiderHost $ do
16 (pulseE, pulseTriggerRef) <- newEventWithTriggerRef
17 ((mactuateRef, e), FireCommand fire) <- hostPerformEventT $ x pulseE
18 hnd <- subscribeEvent e
19 out1 <- fireEventRefAndRead pulseTriggerRef () hnd
20 out2 <- fmap join $ forM mactuateRef $ \actuateRef -> do
22 mGetValue <- readEvent hnd
24 Nothing -> return Nothing
25 Just getValue -> fmap Just getValue
26 mactuate <- readRef actuateRef
27 mpulse <- readRef pulseTriggerRef
28 forM ((,) <$> mactuate <*> mpulse) $ \(actuate, pulse) -> do
29 _ <- fire [actuate :=> Identity ()] $ return ()
30 [Just a] <- fire [pulse :=> Identity ()] $ readPhase
31 [Just b, Nothing] <- fire [actuate :=> Identity (), pulse :=> Identity ()] $ readPhase
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