on develop help sign in
Merge pull request #417 from endgame/headless-multiple-timelines

Run each headless network on its own timeline

commitefe98daf99ffab9547252f41104bdb86a783b5e0 authorElliot Cameron <3noch@users.noreply.github.com> dateTue 5 May 2020, 08:41 (6 years ago) parent55909aac6092be
1 file changed+3−5
src/Reflex/Host/Headless.hs+3−5
src/Reflex/Host/Headless.hs+3−5
@@ -43,7 +43,7 @@ type MonadHeadlessApp t m =
4343-- | Run a headless FRP network. Inside the action, you will most probably use
4444-- the capabilities provided by the 'TriggerEvent' and 'PerformEvent' type
4545-- classes to interface the FRP network with the outside world. Useful for
46−-- testing.
46+-- testing. Each headless network runs on its own spider timeline.
4747runHeadlessApp
4848 :: (forall t m. MonadHeadlessApp t m => m (Event t ()))
4949 -- ^ The action to be run in the headless FRP network. The FRP network is
@@ -51,10 +51,8 @@ runHeadlessApp
5151 -> IO ()
5252runHeadlessApp guest =
5353 -- We are using the 'Spider' implementation of reflex. Running the host
54− -- allows us to take actions on the FRP timeline. The scoped type signature
55− -- specifies that our host runs on the Global timeline.
56− -- For more information, see 'Reflex.Spider.Internal.runSpiderHost'.
57− (runSpiderHost :: SpiderHost Global a -> IO a) $ do
54+ -- allows us to take actions on the FRP timeline.
55+ withSpiderTimeline $ runSpiderHostForTimeline $ do
5856 -- Create the "post-build" event and associated trigger. This event fires
5957 -- once, when the application starts.
6058 (postBuild, postBuildTriggerRef) <- newEventWithTriggerRef