Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Report Dynamic-based causality loops better #120

Open
ryantrinkle opened this issue Jul 6, 2017 · 1 comment
Open

Report Dynamic-based causality loops better #120

ryantrinkle opened this issue Jul 6, 2017 · 1 comment

Comments

@ryantrinkle
Copy link
Member

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 #-}

import Control.Monad
import Reflex.Dom

main = mainWidget $ do
  postBuild <- getPostBuild
  rec dd <- holdDyn (constDyn ()) (d <$ postBuild)
      let d = join dd
  performEvent_ $ return <$> updated d
@ryantrinkle ryantrinkle added this to the Later milestone Jan 4, 2018
@ryantrinkle
Copy link
Member Author

ryantrinkle commented Aug 30, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants