Skip to content

Commit

Permalink
Add haddock for runHeadlessApp
Browse files Browse the repository at this point in the history
  • Loading branch information
meditans committed Apr 30, 2020
1 parent b432a09 commit b3f2b0f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Reflex/Host/Headless.hs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import Reflex.Host.Class
import Control.Monad.IO.Class
import Control.Monad.Ref
import Data.IORef
import Data.Dependent.Sum
import Data.Dependent.Sum (DSum (..))
import Control.Concurrent.Chan (newChan, readChan)
import Control.Monad (forM, forM_)
import Control.Monad.Identity (Identity(..))
Expand All @@ -38,8 +38,13 @@ type MonadHeadlessApp t m =
, Adjustable t m
)

-- | Run a headless FRP network. Inside the action, you will most probably use
-- the capabilities provided by the 'TriggerEvent' and 'PerformEvent' type class
-- to interface the FRP network with the outside world. Useful for testing.
runHeadlessApp
:: (forall t m. MonadHeadlessApp t m => m (Event t ()))
-- ^ The action to be run in the headless FRP network. The frp network is
-- closed at the first occurrence of the resulting event.
-> IO ()
runHeadlessApp guest =
(runSpiderHost :: SpiderHost Global a -> IO a) $ do
Expand Down

0 comments on commit b3f2b0f

Please sign in to comment.