{"action":"created","comment":{"url":"https://api.github.com/repos/corsis/clock/pulls/comments/31314466","id":31314466,"diff_hunk":"@@ -179,8 +179,9 @@ instance Num TimeSpec where\n       normalize $ TimeSpec (xs * ys) (xn * yn)\n   negate (TimeSpec xs xn) =\n       normalize $ TimeSpec (negate xs) (negate xn)\n-  abs (TimeSpec xs xn) =\n-      normalize $ TimeSpec (abs xs) (signum xs * xn)\n+  abs (TimeSpec xs xn)\n+\t| xs == 0   = normalize $ TimeSpec 0 xn\n+\t| otherwise = normalize $ TimeSpec (abs xs) (signum xs * xn)\n   signum (normalize -> TimeSpec xs yn)\n     | signum xs == 0 = TimeSpec 0 (signum yn)","path":"System/Clock.hsc","position":10,"original_position":10,"commit_id":"c3679095da8f85ce536cfea5537732ccc834e283","original_commit_id":"c3679095da8f85ce536cfea5537732ccc834e283","user":{"login":"christian-burger","id":1556683,"avatar_url":"https://avatars.githubusercontent.com/u/1556683?v=3","gravatar_id":"","url":"https://api.github.com/users/christian-burger","html_url":"https://github.com/christian-burger","followers_url":"https://api.github.com/users/christian-burger/followers","following_url":"https://api.github.com/users/christian-burger/following{/other_user}","gists_url":"https://api.github.com/users/christian-burger/gists{/gist_id}","starred_url":"https://api.github.com/users/christian-burger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/christian-burger/subscriptions","organizations_url":"https://api.github.com/users/christian-burger/orgs","repos_url":"https://api.github.com/users/christian-burger/repos","events_url":"https://api.github.com/users/christian-burger/events{/privacy}","received_events_url":"https://api.github.com/users/christian-burger/received_events","type":"User","site_admin":false},"body":"Just spotted this: `signum xs == 0 <=> xs == 0`\r\n\r\nI supposed, one could remove the first `signum` in this line of code.","created_at":"2015-05-29T10:42:25Z","updated_at":"2015-05-29T10:42:25Z","html_url":"https://github.com/corsis/clock/pull/24#discussion_r31314466","pull_request_url":"https://api.github.com/repos/corsis/clock/pulls/24","_links":{"self":{"href":"https://api.github.com/repos/corsis/clock/pulls/comments/31314466"},"html":{"href":"https://github.com/corsis/clock/pull/24#discussion_r31314466"},"pull_request":{"href":"https://api.github.com/repos/corsis/clock/pulls/24"}}},"pull_request":{"url":"https://api.github.com/repos/corsis/clock/pulls/24","id":36493286,"html_url":"https://github.com/corsis/clock/pull/24","diff_url":"https://github.com/corsis/clock/pull/24.diff","patch_url":"https://github.com/corsis/clock/pull/24.patch","issue_url":"https://api.github.com/repos/corsis/clock/issues/24","number":24,"state":"open","locked":false,"title":"fixes bug in function `abs`","user":{"login":"christian-burger","id":1556683,"avatar_url":"https://avatars.githubusercontent.com/u/1556683?v=3","gravatar_id":"","url":"https://api.github.com/users/christian-burger","html_url":"https://github.com/christian-burger","followers_url":"https://api.github.com/users/christian-burger/followers","following_url":"https://api.github.com/users/christian-burger/following{/other_user}","gists_url":"https://api.github.com/users/christian-burger/gists{/gist_id}","starred_url":"https://api.github.com/users/christian-burger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/christian-burger/subscriptions","organizations_url":"https://api.github.com/users/christian-burger/orgs","repos_url":"https://api.github.com/users/christian-burger/repos","events_url":"https://api.github.com/users/christian-burger/events{/privacy}","received_events_url":"https://api.github.com/users/christian-burger/received_events","type":"User","site_admin":false},"body":"When the seconds value of a TimeSpec-typed value is `0`, the `signum`\r\nfunction in the function definition of `abs` returns a `0`. This in\r\nturn zeroes the nanoseconds value, even if it was originally non-zero.","created_at":"2015-05-29T10:39:52Z","updated_at":"2015-05-29T10:42:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"88e3f27f6b642edc82214f56f95548493909724d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/corsis/clock/pulls/24/commits","review_comments_url":"https://api.github.com/repos/corsis/clock/pulls/24/comments","review_comment_url":"https://api.github.com/repos/corsis/clock/pulls/comments{/number}","comments_url":"https://api.github.com/repos/corsis/clock/issues/24/comments","statuses_url":"https://api.github.com/repos/corsis/clock/statuses/c3679095da8f85ce536cfea5537732ccc834e283","head":{"label":"christian-burger:fix-diffTimeSpec-for-less-than-1-second-difference","ref":"fix-diffTimeSpec-for-less-than-1-second-difference","sha":"c3679095da8f85ce536cfea5537732ccc834e283","user":{"login":"christian-burger","id":1556683,"avatar_url":"https://avatars.githubusercontent.com/u/1556683?v=3","gravatar_id":"","url":"https://api.github.com/users/christian-burger","html_url":"https://github.com/christian-burger","followers_url":"https://api.github.com/users/christian-burger/followers","following_url":"https://api.github.com/users/christian-burger/following{/other_user}","gists_url":"https://api.github.com/users/christian-burger/gists{/gist_id}","starred_url":"https://api.github.com/users/christian-burger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/christian-burger/subscriptions","organizations_url":"https://api.github.com/users/christian-burger/orgs","repos_url":"https://api.github.com/users/christian-burger/repos","events_url":"https://api.github.com/users/christian-burger/events{/privacy}","received_events_url":"https://api.github.com/users/christian-burger/received_events","type":"User","site_admin":false},"repo":{"id":36496950,"name":"clock","full_name":"christian-burger/clock","owner":{"login":"christian-burger","id":1556683,"avatar_url":"https://avatars.githubusercontent.com/u/1556683?v=3","gravatar_id":"","url":"https://api.github.com/users/christian-burger","html_url":"https://github.com/christian-burger","followers_url":"https://api.github.com/users/christian-burger/followers","following_url":"https://api.github.com/users/christian-burger/following{/other_user}","gists_url":"https://api.github.com/users/christian-burger/gists{/gist_id}","starred_url":"https://api.github.com/users/christian-burger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/christian-burger/subscriptions","organizations_url":"https://api.github.com/users/christian-burger/orgs","repos_url":"https://api.github.com/users/christian-burger/repos","events_url":"https://api.github.com/users/christian-burger/events{/privacy}","received_events_url":"https://api.github.com/users/christian-burger/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/christian-burger/clock","description":"High-resolution clock functions: monotonic, realtime, cputime.","fork":true,"url":"https://api.github.com/repos/christian-burger/clock","forks_url":"https://api.github.com/repos/christian-burger/clock/forks","keys_url":"https://api.github.com/repos/christian-burger/clock/keys{/key_id}","collaborators_url":"https://api.github.com/repos/christian-burger/clock/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/christian-burger/clock/teams","hooks_url":"https://api.github.com/repos/christian-burger/clock/hooks","issue_events_url":"https://api.github.com/repos/christian-burger/clock/issues/events{/number}","events_url":"https://api.github.com/repos/christian-burger/clock/events","assignees_url":"https://api.github.com/repos/christian-burger/clock/assignees{/user}","branches_url":"https://api.github.com/repos/christian-burger/clock/branches{/branch}","tags_url":"https://api.github.com/repos/christian-burger/clock/tags","blobs_url":"https://api.github.com/repos/christian-burger/clock/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/christian-burger/clock/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/christian-burger/clock/git/refs{/sha}","trees_url":"https://api.github.com/repos/christian-burger/clock/git/trees{/sha}","statuses_url":"https://api.github.com/repos/christian-burger/clock/statuses/{sha}","languages_url":"https://api.github.com/repos/christian-burger/clock/languages","stargazers_url":"https://api.github.com/repos/christian-burger/clock/stargazers","contributors_url":"https://api.github.com/repos/christian-burger/clock/contributors","subscribers_url":"https://api.github.com/repos/christian-burger/clock/subscribers","subscription_url":"https://api.github.com/repos/christian-burger/clock/subscription","commits_url":"https://api.github.com/repos/christian-burger/clock/commits{/sha}","git_commits_url":"https://api.github.com/repos/christian-burger/clock/git/commits{/sha}","comments_url":"https://api.github.com/repos/christian-burger/clock/comments{/number}","issue_comment_url":"https://api.github.com/repos/christian-burger/clock/issues/comments{/number}","contents_url":"https://api.github.com/repos/christian-burger/clock/contents/{+path}","compare_url":"https://api.github.com/repos/christian-burger/clock/compare/{base}...{head}","merges_url":"https://api.github.com/repos/christian-burger/clock/merges","archive_url":"https://api.github.com/repos/christian-burger/clock/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/christian-burger/clock/downloads","issues_url":"https://api.github.com/repos/christian-burger/clock/issues{/number}","pulls_url":"https://api.github.com/repos/christian-burger/clock/pulls{/number}","milestones_url":"https://api.github.com/repos/christian-burger/clock/milestones{/number}","notifications_url":"https://api.github.com/repos/christian-burger/clock/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/christian-burger/clock/labels{/name}","releases_url":"https://api.github.com/repos/christian-burger/clock/releases{/id}","created_at":"2015-05-29T10:17:15Z","updated_at":"2015-05-29T10:17:15Z","pushed_at":"2015-05-29T10:33:45Z","git_url":"git://github.com/christian-burger/clock.git","ssh_url":"git@github.com:christian-burger/clock.git","clone_url":"https://github.com/christian-burger/clock.git","svn_url":"https://github.com/christian-burger/clock","homepage":"","size":350,"stargazers_count":0,"watchers_count":0,"language":"Haskell","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"corsis:master","ref":"master","sha":"fb447502644045cf9d7bfc34e63b511f5b065c9a","user":{"login":"corsis","id":1613326,"avatar_url":"https://avatars.githubusercontent.com/u/1613326?v=3","gravatar_id":"","url":"https://api.github.com/users/corsis","html_url":"https://github.com/corsis","followers_url":"https://api.github.com/users/corsis/followers","following_url":"https://api.github.com/users/corsis/following{/other_user}","gists_url":"https://api.github.com/users/corsis/gists{/gist_id}","starred_url":"https://api.github.com/users/corsis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/corsis/subscriptions","organizations_url":"https://api.github.com/users/corsis/orgs","repos_url":"https://api.github.com/users/corsis/repos","events_url":"https://api.github.com/users/corsis/events{/privacy}","received_events_url":"https://api.github.com/users/corsis/received_events","type":"Organization","site_admin":false},"repo":{"id":5438495,"name":"clock","full_name":"corsis/clock","owner":{"login":"corsis","id":1613326,"avatar_url":"https://avatars.githubusercontent.com/u/1613326?v=3","gravatar_id":"","url":"https://api.github.com/users/corsis","html_url":"https://github.com/corsis","followers_url":"https://api.github.com/users/corsis/followers","following_url":"https://api.github.com/users/corsis/following{/other_user}","gists_url":"https://api.github.com/users/corsis/gists{/gist_id}","starred_url":"https://api.github.com/users/corsis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/corsis/subscriptions","organizations_url":"https://api.github.com/users/corsis/orgs","repos_url":"https://api.github.com/users/corsis/repos","events_url":"https://api.github.com/users/corsis/events{/privacy}","received_events_url":"https://api.github.com/users/corsis/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/corsis/clock","description":"High-resolution clock functions: monotonic, realtime, cputime.","fork":false,"url":"https://api.github.com/repos/corsis/clock","forks_url":"https://api.github.com/repos/corsis/clock/forks","keys_url":"https://api.github.com/repos/corsis/clock/keys{/key_id}","collaborators_url":"https://api.github.com/repos/corsis/clock/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/corsis/clock/teams","hooks_url":"https://api.github.com/repos/corsis/clock/hooks","issue_events_url":"https://api.github.com/repos/corsis/clock/issues/events{/number}","events_url":"https://api.github.com/repos/corsis/clock/events","assignees_url":"https://api.github.com/repos/corsis/clock/assignees{/user}","branches_url":"https://api.github.com/repos/corsis/clock/branches{/branch}","tags_url":"https://api.github.com/repos/corsis/clock/tags","blobs_url":"https://api.github.com/repos/corsis/clock/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/corsis/clock/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/corsis/clock/git/refs{/sha}","trees_url":"https://api.github.com/repos/corsis/clock/git/trees{/sha}","statuses_url":"https://api.github.com/repos/corsis/clock/statuses/{sha}","languages_url":"https://api.github.com/repos/corsis/clock/languages","stargazers_url":"https://api.github.com/repos/corsis/clock/stargazers","contributors_url":"https://api.github.com/repos/corsis/clock/contributors","subscribers_url":"https://api.github.com/repos/corsis/clock/subscribers","subscription_url":"https://api.github.com/repos/corsis/clock/subscription","commits_url":"https://api.github.com/repos/corsis/clock/commits{/sha}","git_commits_url":"https://api.github.com/repos/corsis/clock/git/commits{/sha}","comments_url":"https://api.github.com/repos/corsis/clock/comments{/number}","issue_comment_url":"https://api.github.com/repos/corsis/clock/issues/comments{/number}","contents_url":"https://api.github.com/repos/corsis/clock/contents/{+path}","compare_url":"https://api.github.com/repos/corsis/clock/compare/{base}...{head}","merges_url":"https://api.github.com/repos/corsis/clock/merges","archive_url":"https://api.github.com/repos/corsis/clock/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/corsis/clock/downloads","issues_url":"https://api.github.com/repos/corsis/clock/issues{/number}","pulls_url":"https://api.github.com/repos/corsis/clock/pulls{/number}","milestones_url":"https://api.github.com/repos/corsis/clock/milestones{/number}","notifications_url":"https://api.github.com/repos/corsis/clock/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/corsis/clock/labels{/name}","releases_url":"https://api.github.com/repos/corsis/clock/releases{/id}","created_at":"2012-08-16T12:12:11Z","updated_at":"2015-05-08T00:23:21Z","pushed_at":"2015-05-29T10:39:53Z","git_url":"git://github.com/corsis/clock.git","ssh_url":"git@github.com:corsis/clock.git","clone_url":"https://github.com/corsis/clock.git","svn_url":"https://github.com/corsis/clock","homepage":"","size":350,"stargazers_count":13,"watchers_count":13,"language":"Haskell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":11,"mirror_url":null,"open_issues_count":3,"forks":11,"open_issues":3,"watchers":13,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/corsis/clock/pulls/24"},"html":{"href":"https://github.com/corsis/clock/pull/24"},"issue":{"href":"https://api.github.com/repos/corsis/clock/issues/24"},"comments":{"href":"https://api.github.com/repos/corsis/clock/issues/24/comments"},"review_comments":{"href":"https://api.github.com/repos/corsis/clock/pulls/24/comments"},"review_comment":{"href":"https://api.github.com/repos/corsis/clock/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/corsis/clock/pulls/24/commits"},"statuses":{"href":"https://api.github.com/repos/corsis/clock/statuses/c3679095da8f85ce536cfea5537732ccc834e283"}}}}