{"action":"created","issue":{"url":"https://api.github.com/repos/valderman/haste-compiler/issues/289","labels_url":"https://api.github.com/repos/valderman/haste-compiler/issues/289/labels{/name}","comments_url":"https://api.github.com/repos/valderman/haste-compiler/issues/289/comments","events_url":"https://api.github.com/repos/valderman/haste-compiler/issues/289/events","html_url":"https://github.com/valderman/haste-compiler/issues/289","id":55278842,"number":289,"title":"Compiler bug?","user":{"login":"mbrodersen","id":443830,"avatar_url":"https://avatars.githubusercontent.com/u/443830?v=3","gravatar_id":"","url":"https://api.github.com/users/mbrodersen","html_url":"https://github.com/mbrodersen","followers_url":"https://api.github.com/users/mbrodersen/followers","following_url":"https://api.github.com/users/mbrodersen/following{/other_user}","gists_url":"https://api.github.com/users/mbrodersen/gists{/gist_id}","starred_url":"https://api.github.com/users/mbrodersen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbrodersen/subscriptions","organizations_url":"https://api.github.com/users/mbrodersen/orgs","repos_url":"https://api.github.com/users/mbrodersen/repos","events_url":"https://api.github.com/users/mbrodersen/events{/privacy}","received_events_url":"https://api.github.com/users/mbrodersen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":19,"created_at":"2015-01-23T13:00:10Z","updated_at":"2015-08-27T11:14:27Z","closed_at":null,"body":"Hi,\r\n\r\nI today updated Haste to latest. Unfortunately this introduced a strange bug deep in my code that looks very odd. In the following code, (buttonDown w) will be False in the code *above* the \"where\" and False in the code *below* the \"where\". Which should not be possible. I get the following output when releasing the mouse button, hovering the mouse over the widget button:\r\n\r\n\t[Debug \"Handling MouseUp [False]\",Ignore,Debug \"True\",...]\r\n\r\nNotice that (buttonDown w) is both False and True at the same time :-/\r\n\r\n\tupdateWidget :: (Eq id,Show id) => Event -> Widget id -> ([WidgetEvent id],Widget id)\r\n\t\r\n\tupdateWidget e (ButtonWidget w) =\r\n\tcase e of\r\n\t\tMouseDown xy 0 ->\r\n\t\t\t(ignoreMaybe xy, ButtonWidget w { buttonDown = isHit xy })\r\n\r\n\t\tMouseMove xy ->\r\n\t\t\tif buttonDown w && not (isHit xy) then\r\n\t\t\t\t(ignoreMaybe xy, ButtonWidget w { buttonDown = False })\r\n\t\t\telse\r\n\t\t\t\t(ignoreMaybe xy, ButtonWidget w)\r\n\r\n\t\tMouseUp xy 0 ->\r\n\t\t\tif buttonDown w then\r\n\t\t\t\t([WidgetClicked $ buttonId w], ButtonWidget w { buttonDown = False })\r\n\t\t\telse\r\n\t\t\t\t([Debug $ \"Handling MouseUp [\" ++ show (buttonDown w) ++ \"]\"] ++ ignoreMaybe xy, ButtonWidget w)\r\n\r\n\t\t_ -> ([], ButtonWidget w)\r\n\r\n\twhere\r\n\t\tignoreMaybe xy = if isHit\txy then [Ignore, Debug $ show $ buttonDown w, Debug $ show e, Debug $ show w] else []\r\n\r\n\t\tisHit (x,y) = box2IsHit (V2 x y) (buttonBox w)\r\n"},"comment":{"url":"https://api.github.com/repos/valderman/haste-compiler/issues/comments/135389095","html_url":"https://github.com/valderman/haste-compiler/issues/289#issuecomment-135389095","issue_url":"https://api.github.com/repos/valderman/haste-compiler/issues/289","id":135389095,"user":{"login":"mbrodersen","id":443830,"avatar_url":"https://avatars.githubusercontent.com/u/443830?v=3","gravatar_id":"","url":"https://api.github.com/users/mbrodersen","html_url":"https://github.com/mbrodersen","followers_url":"https://api.github.com/users/mbrodersen/followers","following_url":"https://api.github.com/users/mbrodersen/following{/other_user}","gists_url":"https://api.github.com/users/mbrodersen/gists{/gist_id}","starred_url":"https://api.github.com/users/mbrodersen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbrodersen/subscriptions","organizations_url":"https://api.github.com/users/mbrodersen/orgs","repos_url":"https://api.github.com/users/mbrodersen/repos","events_url":"https://api.github.com/users/mbrodersen/events{/privacy}","received_events_url":"https://api.github.com/users/mbrodersen/received_events","type":"User","site_admin":false},"created_at":"2015-08-27T11:14:27Z","updated_at":"2015-08-27T11:14:27Z","body":"Excellent. I will take it for a spin :-)\n\nOn Thu, Aug 27, 2015 at 7:46 PM, Anton Ekblad <notifications@github.com>\nwrote:\n\n> OK, so the problem should be fixed on master now. More specifically, the\n> RTS would blackhole non-updatable thunks, which was fine for single entry\n> ones but distinctly not fine for non-updatable yet reentrant thunks.\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/valderman/haste-compiler/issues/289#issuecomment-135367025>\n> .\n>\n"}}