{"action":"created","issue":{"url":"https://api.github.com/repos/purescript/purescript/issues/2093","repository_url":"https://api.github.com/repos/purescript/purescript","labels_url":"https://api.github.com/repos/purescript/purescript/issues/2093/labels{/name}","comments_url":"https://api.github.com/repos/purescript/purescript/issues/2093/comments","events_url":"https://api.github.com/repos/purescript/purescript/issues/2093/events","html_url":"https://github.com/purescript/purescript/issues/2093","id":153366693,"number":2093,"title":"Test `InferRecFunWithConstrainedArgument.purs` contains an unreliable comparison","user":{"login":"andyarvanitis","id":1289006,"avatar_url":"https://avatars.githubusercontent.com/u/1289006?v=3","gravatar_id":"","url":"https://api.github.com/users/andyarvanitis","html_url":"https://github.com/andyarvanitis","followers_url":"https://api.github.com/users/andyarvanitis/followers","following_url":"https://api.github.com/users/andyarvanitis/following{/other_user}","gists_url":"https://api.github.com/users/andyarvanitis/gists{/gist_id}","starred_url":"https://api.github.com/users/andyarvanitis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andyarvanitis/subscriptions","organizations_url":"https://api.github.com/users/andyarvanitis/orgs","repos_url":"https://api.github.com/users/andyarvanitis/repos","events_url":"https://api.github.com/users/andyarvanitis/events{/privacy}","received_events_url":"https://api.github.com/users/andyarvanitis/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-05-06T02:35:15Z","updated_at":"2016-05-06T12:40:01Z","closed_at":null,"body":"Compiler test:\r\n`examples/passing/InferRecFunWithConstrainedArgument.purs`\r\n\r\n```PureScript\r\nmodule Main where\r\nimport Prelude\r\n\r\ntest 100.0 = 100.0\r\ntest n = test(1.0 + n)\r\n\r\nmain = Control.Monad.Eff.Console.print $ test 0.0\r\n```\r\n\r\nuses a floating-point number equality comparison (following some computations). This is unreliable and unsafe. In this case, you'll occasionally (somewhat randomly) get an infinite loop.\r\n\r\nDiscovered with the C++ backend, but same issue applies to JavaScript. I think the test should be changed, but maybe the comparison operators for `Number` (floating point) should be discussed?\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/purescript/purescript/issues/comments/217428666","html_url":"https://github.com/purescript/purescript/issues/2093#issuecomment-217428666","issue_url":"https://api.github.com/repos/purescript/purescript/issues/2093","id":217428666,"user":{"login":"hdgarrood","id":1270186,"avatar_url":"https://avatars.githubusercontent.com/u/1270186?v=3","gravatar_id":"","url":"https://api.github.com/users/hdgarrood","html_url":"https://github.com/hdgarrood","followers_url":"https://api.github.com/users/hdgarrood/followers","following_url":"https://api.github.com/users/hdgarrood/following{/other_user}","gists_url":"https://api.github.com/users/hdgarrood/gists{/gist_id}","starred_url":"https://api.github.com/users/hdgarrood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hdgarrood/subscriptions","organizations_url":"https://api.github.com/users/hdgarrood/orgs","repos_url":"https://api.github.com/users/hdgarrood/repos","events_url":"https://api.github.com/users/hdgarrood/events{/privacy}","received_events_url":"https://api.github.com/users/hdgarrood/received_events","type":"User","site_admin":false},"created_at":"2016-05-06T12:40:01Z","updated_at":"2016-05-06T12:40:01Z","body":"According to https://github.com/andyarvanitis/purescript-native#other-notes, the C++ backend uses `double` for `Number`."}}