You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a causality loop is created by joining a Dynamic whose contents depend on itself, reflex reports this as
<interactive>: heightBagRemove: Height 1 not present in bag HeightBag {_heightBag_size = 2, _heightBag_contents = fromList [(0,1)]}
CallStack (from HasCallStack):
error, called at src/Reflex/Spider/Internal.hs:1015:14 in reflex-0.5.0-4m111lPPOvPBxxVtye35C3:Reflex.Spider.Internal
Ideally, it should report this as a causality loop explicitly, instead.
Here's some code that exhibits the problem:
{-# LANGUAGE RecursiveDo #-}
importControl.MonadimportReflex.Dom
main = mainWidget $do
postBuild <- getPostBuild
rec dd <- holdDyn (constDyn ()) (d <$ postBuild)
let d = join dd
performEvent_ $return<$> updated d
The text was updated successfully, but these errors were encountered:
That's a good old traditional Haskell loop - no FRP involved. 'sample b'
is being used to initialize 'dyn', which is where 'b' comes from. Pretty
nearly the same as
`rec r <- newIORef =<< readIORef r`
On Thu, Aug 30, 2018 at 7:44 PM Kosyrev Serge ***@***.***> wrote:
This makes me wonder -- what would be the semantics of the following?
loopDyn = mdo
let b = current dyn
e ← delay 0 $ updated dyn
dyn ← buildDynamic (sample b) $ tag b e
pure dyn
I found that it hangs my (reflex-glfw-based) Reflex host, preventing it
from processing events -- but doesn't cause a cpu busyloop.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#120 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABGlYJCtMBBhhh31Y5Y_EnHLxHJlAWj0ks5uWHjYgaJpZM4OQUM0>
.
When a causality loop is created by joining a Dynamic whose contents depend on itself, reflex reports this as
Ideally, it should report this as a causality loop explicitly, instead.
Here's some code that exhibits the problem:
The text was updated successfully, but these errors were encountered: