Open ryantrinkle opened 7 years ago
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 notifications@github.com 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 https://github.com/reflex-frp/reflex/issues/120#issuecomment-417503074, 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: