{"action":"opened","number":2,"pull_request":{"url":"https://api.github.com/repos/afiskon/simple-genetic-algorithm/pulls/2","id":28667187,"html_url":"https://github.com/afiskon/simple-genetic-algorithm/pull/2","diff_url":"https://github.com/afiskon/simple-genetic-algorithm/pull/2.diff","patch_url":"https://github.com/afiskon/simple-genetic-algorithm/pull/2.patch","issue_url":"https://api.github.com/repos/afiskon/simple-genetic-algorithm/issues/2","number":2,"state":"open","locked":false,"title":"MonadRandom monad support","user":{"login":"JPMoresmau","id":122273,"avatar_url":"https://avatars.githubusercontent.com/u/122273?v=3","gravatar_id":"","url":"https://api.github.com/users/JPMoresmau","html_url":"https://github.com/JPMoresmau","followers_url":"https://api.github.com/users/JPMoresmau/followers","following_url":"https://api.github.com/users/JPMoresmau/following{/other_user}","gists_url":"https://api.github.com/users/JPMoresmau/gists{/gist_id}","starred_url":"https://api.github.com/users/JPMoresmau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JPMoresmau/subscriptions","organizations_url":"https://api.github.com/users/JPMoresmau/orgs","repos_url":"https://api.github.com/users/JPMoresmau/repos","events_url":"https://api.github.com/users/JPMoresmau/events{/privacy}","received_events_url":"https://api.github.com/users/JPMoresmau/received_events","type":"User","site_admin":false},"body":"Hello, I don't know if you'll agree, but here goes. This changes your code from pure functions to Rand and RandT functions, which basically means we're using the MonadRandom monad to thread the random generator. This saves the user of the library to have to return the new generator, which makes the client code easier to write. The downside is that there are more dependencies on other libraries and maybe the code is more intimidating to new Haskell users. I've checked and the parallelism is not impacted (all cores are used when running with +RTS -N).","created_at":"2015-02-04T19:27:42Z","updated_at":"2015-02-04T19:27:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/afiskon/simple-genetic-algorithm/pulls/2/commits","review_comments_url":"https://api.github.com/repos/afiskon/simple-genetic-algorithm/pulls/2/comments","review_comment_url":"https://api.github.com/repos/afiskon/simple-genetic-algorithm/pulls/comments/{number}","comments_url":"https://api.github.com/repos/afiskon/simple-genetic-algorithm/issues/2/comments","statuses_url":"https://api.github.com/repos/afiskon/simple-genetic-algorithm/statuses/f650a9c3442cc5ea29d95eb2b1292ff3cbe37d56","head":{"label":"JPMoresmau:MonadRandom","ref":"MonadRandom","sha":"f650a9c3442cc5ea29d95eb2b1292ff3cbe37d56","user":{"login":"JPMoresmau","id":122273,"avatar_url":"https://avatars.githubusercontent.com/u/122273?v=3","gravatar_id":"","url":"https://api.github.com/users/JPMoresmau","html_url":"https://github.com/JPMoresmau","followers_url":"https://api.github.com/users/JPMoresmau/followers","following_url":"https://api.github.com/users/JPMoresmau/following{/other_user}","gists_url":"https://api.github.com/users/JPMoresmau/gists{/gist_id}","starred_url":"https://api.github.com/users/JPMoresmau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JPMoresmau/subscriptions","organizations_url":"https://api.github.com/users/JPMoresmau/orgs","repos_url":"https://api.github.com/users/JPMoresmau/repos","events_url":"https://api.github.com/users/JPMoresmau/events{/privacy}","received_events_url":"https://api.github.com/users/JPMoresmau/received_events","type":"User","site_admin":false},"repo":{"id":30203187,"name":"simple-genetic-algorithm","full_name":"JPMoresmau/simple-genetic-algorithm","owner":{"login":"JPMoresmau","id":122273,"avatar_url":"https://avatars.githubusercontent.com/u/122273?v=3","gravatar_id":"","url":"https://api.github.com/users/JPMoresmau","html_url":"https://github.com/JPMoresmau","followers_url":"https://api.github.com/users/JPMoresmau/followers","following_url":"https://api.github.com/users/JPMoresmau/following{/other_user}","gists_url":"https://api.github.com/users/JPMoresmau/gists{/gist_id}","starred_url":"https://api.github.com/users/JPMoresmau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JPMoresmau/subscriptions","organizations_url":"https://api.github.com/users/JPMoresmau/orgs","repos_url":"https://api.github.com/users/JPMoresmau/repos","events_url":"https://api.github.com/users/JPMoresmau/events{/privacy}","received_events_url":"https://api.github.com/users/JPMoresmau/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/JPMoresmau/simple-genetic-algorithm","description":"Simple parallel genetic algorithm implementation in pure Haskell","fork":true,"url":"https://api.github.com/repos/JPMoresmau/simple-genetic-algorithm","forks_url":"https://api.github.com/repos/JPMoresmau/simple-genetic-algorithm/forks","keys_url":"https://api.github.com/repos/JPMoresmau/simple-genetic-algorithm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JPMoresmau/simple-genetic-algorithm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JPMoresmau/simple-genetic-algorithm/teams","hooks_url":"https://api.github.com/repos/JPMoresmau/simple-genetic-algorithm/hooks","issue_events_url":"https://api.github.com/repos/JPMoresmau/simple-genetic-algorithm/issues/events{/number}","events_url":"https://api.github.com/repos/JPMoresmau/simple-genetic-algorithm/events","assignees_url":"https://api.github.com/repos/JPMoresmau/simple-genetic-algorithm/assignees{/user}","branches_url":"https://api.github.com/repos/JPMoresmau/simple-genetic-algorithm/branches{/branch}","tags_url":"https://api.github.com/repos/JPMoresmau/simple-genetic-algorithm/tags","blobs_url":"https://api.github.com/repos/JPMoresmau/simple-genetic-algorithm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JPMoresmau/simple-genetic-algorithm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JPMoresmau/simple-genetic-algorithm/git/refs{/sha}","trees_url":"https://api.github.com/repos/JPMoresmau/simple-genetic-algorithm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JPMoresmau/simple-genetic-algorithm/statuses/{sha}","languages_url":"https://api.github.com/repos/JPMoresmau/simple-genetic-algorithm/languages","stargazers_url":"https://api.github.com/repos/JPMoresmau/simple-genetic-algorithm/stargazers","contributors_url":"https://api.github.com/repos/JPMoresmau/simple-genetic-algorithm/contributors","subscribers_url":"https://api.github.com/repos/JPMoresmau/simple-genetic-algorithm/subscribers","subscription_url":"https://api.github.com/repos/JPMoresmau/simple-genetic-algorithm/subscription","commits_url":"https://api.github.com/repos/JPMoresmau/simple-genetic-algorithm/commits{/sha}","git_commits_url":"https://api.github.com/repos/JPMoresmau/simple-genetic-algorithm/git/commits{/sha}","comments_url":"https://api.github.com/repos/JPMoresmau/simple-genetic-algorithm/comments{/number}","issue_comment_url":"https://api.github.com/repos/JPMoresmau/simple-genetic-algorithm/issues/comments/{number}","contents_url":"https://api.github.com/repos/JPMoresmau/simple-genetic-algorithm/contents/{+path}","compare_url":"https://api.github.com/repos/JPMoresmau/simple-genetic-algorithm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JPMoresmau/simple-genetic-algorithm/merges","archive_url":"https://api.github.com/repos/JPMoresmau/simple-genetic-algorithm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JPMoresmau/simple-genetic-algorithm/downloads","issues_url":"https://api.github.com/repos/JPMoresmau/simple-genetic-algorithm/issues{/number}","pulls_url":"https://api.github.com/repos/JPMoresmau/simple-genetic-algorithm/pulls{/number}","milestones_url":"https://api.github.com/repos/JPMoresmau/simple-genetic-algorithm/milestones{/number}","notifications_url":"https://api.github.com/repos/JPMoresmau/simple-genetic-algorithm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JPMoresmau/simple-genetic-algorithm/labels{/name}","releases_url":"https://api.github.com/repos/JPMoresmau/simple-genetic-algorithm/releases{/id}","created_at":"2015-02-02T19:09:47Z","updated_at":"2015-02-02T19:09:48Z","pushed_at":"2015-02-03T19:34:50Z","git_url":"git://github.com/JPMoresmau/simple-genetic-algorithm.git","ssh_url":"git@github.com:JPMoresmau/simple-genetic-algorithm.git","clone_url":"https://github.com/JPMoresmau/simple-genetic-algorithm.git","svn_url":"https://github.com/JPMoresmau/simple-genetic-algorithm","homepage":"http://eax.me/haskell-genetic-algorithm/","size":101,"stargazers_count":0,"watchers_count":0,"language":"Haskell","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"afiskon:master","ref":"master","sha":"f050320ceaef8f8c4a74de7d74c286a504401225","user":{"login":"afiskon","id":800352,"avatar_url":"https://avatars.githubusercontent.com/u/800352?v=3","gravatar_id":"","url":"https://api.github.com/users/afiskon","html_url":"https://github.com/afiskon","followers_url":"https://api.github.com/users/afiskon/followers","following_url":"https://api.github.com/users/afiskon/following{/other_user}","gists_url":"https://api.github.com/users/afiskon/gists{/gist_id}","starred_url":"https://api.github.com/users/afiskon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/afiskon/subscriptions","organizations_url":"https://api.github.com/users/afiskon/orgs","repos_url":"https://api.github.com/users/afiskon/repos","events_url":"https://api.github.com/users/afiskon/events{/privacy}","received_events_url":"https://api.github.com/users/afiskon/received_events","type":"User","site_admin":false},"repo":{"id":18013321,"name":"simple-genetic-algorithm","full_name":"afiskon/simple-genetic-algorithm","owner":{"login":"afiskon","id":800352,"avatar_url":"https://avatars.githubusercontent.com/u/800352?v=3","gravatar_id":"","url":"https://api.github.com/users/afiskon","html_url":"https://github.com/afiskon","followers_url":"https://api.github.com/users/afiskon/followers","following_url":"https://api.github.com/users/afiskon/following{/other_user}","gists_url":"https://api.github.com/users/afiskon/gists{/gist_id}","starred_url":"https://api.github.com/users/afiskon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/afiskon/subscriptions","organizations_url":"https://api.github.com/users/afiskon/orgs","repos_url":"https://api.github.com/users/afiskon/repos","events_url":"https://api.github.com/users/afiskon/events{/privacy}","received_events_url":"https://api.github.com/users/afiskon/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/afiskon/simple-genetic-algorithm","description":"Simple parallel genetic algorithm implementation in pure Haskell","fork":false,"url":"https://api.github.com/repos/afiskon/simple-genetic-algorithm","forks_url":"https://api.github.com/repos/afiskon/simple-genetic-algorithm/forks","keys_url":"https://api.github.com/repos/afiskon/simple-genetic-algorithm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/afiskon/simple-genetic-algorithm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/afiskon/simple-genetic-algorithm/teams","hooks_url":"https://api.github.com/repos/afiskon/simple-genetic-algorithm/hooks","issue_events_url":"https://api.github.com/repos/afiskon/simple-genetic-algorithm/issues/events{/number}","events_url":"https://api.github.com/repos/afiskon/simple-genetic-algorithm/events","assignees_url":"https://api.github.com/repos/afiskon/simple-genetic-algorithm/assignees{/user}","branches_url":"https://api.github.com/repos/afiskon/simple-genetic-algorithm/branches{/branch}","tags_url":"https://api.github.com/repos/afiskon/simple-genetic-algorithm/tags","blobs_url":"https://api.github.com/repos/afiskon/simple-genetic-algorithm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/afiskon/simple-genetic-algorithm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/afiskon/simple-genetic-algorithm/git/refs{/sha}","trees_url":"https://api.github.com/repos/afiskon/simple-genetic-algorithm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/afiskon/simple-genetic-algorithm/statuses/{sha}","languages_url":"https://api.github.com/repos/afiskon/simple-genetic-algorithm/languages","stargazers_url":"https://api.github.com/repos/afiskon/simple-genetic-algorithm/stargazers","contributors_url":"https://api.github.com/repos/afiskon/simple-genetic-algorithm/contributors","subscribers_url":"https://api.github.com/repos/afiskon/simple-genetic-algorithm/subscribers","subscription_url":"https://api.github.com/repos/afiskon/simple-genetic-algorithm/subscription","commits_url":"https://api.github.com/repos/afiskon/simple-genetic-algorithm/commits{/sha}","git_commits_url":"https://api.github.com/repos/afiskon/simple-genetic-algorithm/git/commits{/sha}","comments_url":"https://api.github.com/repos/afiskon/simple-genetic-algorithm/comments{/number}","issue_comment_url":"https://api.github.com/repos/afiskon/simple-genetic-algorithm/issues/comments/{number}","contents_url":"https://api.github.com/repos/afiskon/simple-genetic-algorithm/contents/{+path}","compare_url":"https://api.github.com/repos/afiskon/simple-genetic-algorithm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/afiskon/simple-genetic-algorithm/merges","archive_url":"https://api.github.com/repos/afiskon/simple-genetic-algorithm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/afiskon/simple-genetic-algorithm/downloads","issues_url":"https://api.github.com/repos/afiskon/simple-genetic-algorithm/issues{/number}","pulls_url":"https://api.github.com/repos/afiskon/simple-genetic-algorithm/pulls{/number}","milestones_url":"https://api.github.com/repos/afiskon/simple-genetic-algorithm/milestones{/number}","notifications_url":"https://api.github.com/repos/afiskon/simple-genetic-algorithm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/afiskon/simple-genetic-algorithm/labels{/name}","releases_url":"https://api.github.com/repos/afiskon/simple-genetic-algorithm/releases{/id}","created_at":"2014-03-22T15:56:55Z","updated_at":"2015-02-02T19:26:33Z","pushed_at":"2015-02-02T19:26:32Z","git_url":"git://github.com/afiskon/simple-genetic-algorithm.git","ssh_url":"git@github.com:afiskon/simple-genetic-algorithm.git","clone_url":"https://github.com/afiskon/simple-genetic-algorithm.git","svn_url":"https://github.com/afiskon/simple-genetic-algorithm","homepage":"http://eax.me/haskell-genetic-algorithm/","size":198,"stargazers_count":1,"watchers_count":1,"language":"Haskell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/afiskon/simple-genetic-algorithm/pulls/2"},"html":{"href":"https://github.com/afiskon/simple-genetic-algorithm/pull/2"},"issue":{"href":"https://api.github.com/repos/afiskon/simple-genetic-algorithm/issues/2"},"comments":{"href":"https://api.github.com/repos/afiskon/simple-genetic-algorithm/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/afiskon/simple-genetic-algorithm/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/afiskon/simple-genetic-algorithm/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/afiskon/simple-genetic-algorithm/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/afiskon/simple-genetic-algorithm/statuses/f650a9c3442cc5ea29d95eb2b1292ff3cbe37d56"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":2,"additions":89,"deletions":82,"changed_files":3}}