on develop help sign in
Add haddock for runHeadlessApp
commit7e75086197d8215d630753ed3ad1db8f66e252fa authorCarlo Nucera <carlo.nucera@protonmail.com> dateThu 30 Apr 2020, 12:14 (6 years ago) parentb432a09
1 file changed+7−1
src/Reflex/Host/Headless.hs+7−1
src/Reflex/Host/Headless.hs+7−1
@@ -14,7 +14,7 @@ import Reflex.Host.Class
1414import Control.Monad.IO.Class
1515import Control.Monad.Ref
1616import Data.IORef
17−import Data.Dependent.Sum
17+import Data.Dependent.Sum (DSum (..))
1818import Control.Concurrent.Chan (newChan, readChan)
1919import Control.Monad (forM, forM_)
2020import Control.Monad.Identity (Identity(..))
@@ -38,8 +38,14 @@ type MonadHeadlessApp t m =
3838 , Adjustable t m
3939 )
4040
41+-- | Run a headless FRP network. Inside the action, you will most probably use
42+-- the capabilities provided by the 'TriggerEvent' and 'PerformEvent' type
43+-- classes to interface the FRP network with the outside world. Useful for
44+-- testing.
4145runHeadlessApp
4246 :: (forall t m. MonadHeadlessApp t m => m (Event t ()))
47+ -- ^ The action to be run in the headless FRP network. The FRP network is
48+ -- closed at the first occurrence of the resulting 'Event'.
4349 -> IO ()
4450runHeadlessApp guest =
4551 (runSpiderHost :: SpiderHost Global a -> IO a) $ do