My understanding is that the following should print two lines, but it only prints once.
module Main where
import Control.Concurrent
import Control.FRPNow
main :: IO ()
main =
runNowMaster
(do (later,fireLater) <- callback
plan (fmap (const (sync (putStrLn "later"))) later)
reallyLater <-
sample (futuristic (return later))
plan (fmap (const (sync (putStrLn "reallyLater"))) reallyLater)
async (threadDelay 100000 >> fireLater ())
return never)
However, I guess this is questionable use of futuristic, as return later doesn't really denote a Behavior where the Event is always in the future, though no error is thrown either.
My understanding is that the following should print two lines, but it only prints once.
However, I guess this is questionable use of
futuristic
, asreturn later
doesn't really denote aBehavior
where theEvent
is always in the future, though no error is thrown either.