{"action":"created","comment":{"url":"https://api.github.com/repos/tpolecat/doobie/pulls/comments/53267819","id":53267819,"diff_hunk":"@@ -205,6 +205,17 @@ object resultset {\n       case (None, _)            => None\n     }\n \n+  /**\n+    * Consumes the remainder of the resultset, but verifies that there is at least one row remaining.\n+    * @throws `UnexpectedEnd` if there is not at least one row remaining\n+    * @group Results\n+    */\n+  def getNel[A: Composite]: ResultSetIO[NonEmptyList[A]] =","path":"core/src/main/scala/doobie/hi/resultset.scala","position":18,"original_position":18,"commit_id":"8fc5d1ad4f1e579408a743cb814e8cb35fcc9192","original_commit_id":"8fc5d1ad4f1e579408a743cb814e8cb35fcc9192","user":{"login":"tpolecat","id":1200131,"avatar_url":"https://avatars.githubusercontent.com/u/1200131?v=3","gravatar_id":"","url":"https://api.github.com/users/tpolecat","html_url":"https://github.com/tpolecat","followers_url":"https://api.github.com/users/tpolecat/followers","following_url":"https://api.github.com/users/tpolecat/following{/other_user}","gists_url":"https://api.github.com/users/tpolecat/gists{/gist_id}","starred_url":"https://api.github.com/users/tpolecat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tpolecat/subscriptions","organizations_url":"https://api.github.com/users/tpolecat/orgs","repos_url":"https://api.github.com/users/tpolecat/repos","events_url":"https://api.github.com/users/tpolecat/events{/privacy}","received_events_url":"https://api.github.com/users/tpolecat/received_events","type":"User","site_admin":false},"body":"Can we just call this `nel`?","created_at":"2016-02-18T03:31:40Z","updated_at":"2016-02-18T03:31:40Z","html_url":"https://github.com/tpolecat/doobie/pull/272#discussion_r53267819","pull_request_url":"https://api.github.com/repos/tpolecat/doobie/pulls/272","_links":{"self":{"href":"https://api.github.com/repos/tpolecat/doobie/pulls/comments/53267819"},"html":{"href":"https://github.com/tpolecat/doobie/pull/272#discussion_r53267819"},"pull_request":{"href":"https://api.github.com/repos/tpolecat/doobie/pulls/272"}}},"pull_request":{"url":"https://api.github.com/repos/tpolecat/doobie/pulls/272","id":59740110,"html_url":"https://github.com/tpolecat/doobie/pull/272","diff_url":"https://github.com/tpolecat/doobie/pull/272.diff","patch_url":"https://github.com/tpolecat/doobie/pull/272.patch","issue_url":"https://api.github.com/repos/tpolecat/doobie/issues/272","number":272,"state":"open","locked":false,"title":"add NonEmptyList `.nel` support to RS, Query, Query0, docs","user":{"login":"refried","id":538571,"avatar_url":"https://avatars.githubusercontent.com/u/538571?v=3","gravatar_id":"","url":"https://api.github.com/users/refried","html_url":"https://github.com/refried","followers_url":"https://api.github.com/users/refried/followers","following_url":"https://api.github.com/users/refried/following{/other_user}","gists_url":"https://api.github.com/users/refried/gists{/gist_id}","starred_url":"https://api.github.com/users/refried/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/refried/subscriptions","organizations_url":"https://api.github.com/users/refried/orgs","repos_url":"https://api.github.com/users/refried/repos","events_url":"https://api.github.com/users/refried/events{/privacy}","received_events_url":"https://api.github.com/users/refried/received_events","type":"User","site_admin":false},"body":"What do you think about this, to convert the following sort of construction (and its accompanying warning):\r\n\r\n```scala\r\nimplicit class toNelUnsafe[F[_] : Functor, A](fa: F[List[A]]) {\r\n  def toNelUnsafe: F[NonEmptyList[A]] = fa map {\r\n    case a :: as => NonEmptyList.nel(a, as) // not total\r\n  }\r\n}\r\n\r\ndef getItems(orderId: OrderId): ConnectionIO[NonEmptyList[ItemId]] =\r\n  sql\"\"\"\r\n    SELECT item_id FROM order_contents WHERE order_id = $orderId\r\n  \"\"\".query[ItemId].list.toNelUnsafe\r\n```\r\n\r\ninto \r\n\r\n```scala\r\ndef getItems(orderId: OrderId): ConnectionIO[NonEmptyList[ItemId]] =\r\n  sql\"\"\"\r\n    SELECT item_id FROM order_contents WHERE order_id = $orderId\r\n  \"\"\".query[ItemId].nel // safe!\r\n```\r\n\r\nP.S. Some whitespace changes got caught up in the first commit too, despite having carefully reverted them once; I converted some legacy tabs to spaces in the second commit.\r\n\r\nP.P.S. Sorry for all the edits, if they triggered multiple emails.","created_at":"2016-02-18T01:59:48Z","updated_at":"2016-02-18T03:31:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1c5fc0ae58cf7dcbd112d380ca9d5681ac4cad66","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/tpolecat/doobie/pulls/272/commits","review_comments_url":"https://api.github.com/repos/tpolecat/doobie/pulls/272/comments","review_comment_url":"https://api.github.com/repos/tpolecat/doobie/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tpolecat/doobie/issues/272/comments","statuses_url":"https://api.github.com/repos/tpolecat/doobie/statuses/8fc5d1ad4f1e579408a743cb814e8cb35fcc9192","head":{"label":"refried:getNEL","ref":"getNEL","sha":"8fc5d1ad4f1e579408a743cb814e8cb35fcc9192","user":{"login":"refried","id":538571,"avatar_url":"https://avatars.githubusercontent.com/u/538571?v=3","gravatar_id":"","url":"https://api.github.com/users/refried","html_url":"https://github.com/refried","followers_url":"https://api.github.com/users/refried/followers","following_url":"https://api.github.com/users/refried/following{/other_user}","gists_url":"https://api.github.com/users/refried/gists{/gist_id}","starred_url":"https://api.github.com/users/refried/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/refried/subscriptions","organizations_url":"https://api.github.com/users/refried/orgs","repos_url":"https://api.github.com/users/refried/repos","events_url":"https://api.github.com/users/refried/events{/privacy}","received_events_url":"https://api.github.com/users/refried/received_events","type":"User","site_admin":false},"repo":{"id":43220376,"name":"doobie","full_name":"refried/doobie","owner":{"login":"refried","id":538571,"avatar_url":"https://avatars.githubusercontent.com/u/538571?v=3","gravatar_id":"","url":"https://api.github.com/users/refried","html_url":"https://github.com/refried","followers_url":"https://api.github.com/users/refried/followers","following_url":"https://api.github.com/users/refried/following{/other_user}","gists_url":"https://api.github.com/users/refried/gists{/gist_id}","starred_url":"https://api.github.com/users/refried/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/refried/subscriptions","organizations_url":"https://api.github.com/users/refried/orgs","repos_url":"https://api.github.com/users/refried/repos","events_url":"https://api.github.com/users/refried/events{/privacy}","received_events_url":"https://api.github.com/users/refried/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/refried/doobie","description":"principled database access for scala","fork":true,"url":"https://api.github.com/repos/refried/doobie","forks_url":"https://api.github.com/repos/refried/doobie/forks","keys_url":"https://api.github.com/repos/refried/doobie/keys{/key_id}","collaborators_url":"https://api.github.com/repos/refried/doobie/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/refried/doobie/teams","hooks_url":"https://api.github.com/repos/refried/doobie/hooks","issue_events_url":"https://api.github.com/repos/refried/doobie/issues/events{/number}","events_url":"https://api.github.com/repos/refried/doobie/events","assignees_url":"https://api.github.com/repos/refried/doobie/assignees{/user}","branches_url":"https://api.github.com/repos/refried/doobie/branches{/branch}","tags_url":"https://api.github.com/repos/refried/doobie/tags","blobs_url":"https://api.github.com/repos/refried/doobie/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/refried/doobie/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/refried/doobie/git/refs{/sha}","trees_url":"https://api.github.com/repos/refried/doobie/git/trees{/sha}","statuses_url":"https://api.github.com/repos/refried/doobie/statuses/{sha}","languages_url":"https://api.github.com/repos/refried/doobie/languages","stargazers_url":"https://api.github.com/repos/refried/doobie/stargazers","contributors_url":"https://api.github.com/repos/refried/doobie/contributors","subscribers_url":"https://api.github.com/repos/refried/doobie/subscribers","subscription_url":"https://api.github.com/repos/refried/doobie/subscription","commits_url":"https://api.github.com/repos/refried/doobie/commits{/sha}","git_commits_url":"https://api.github.com/repos/refried/doobie/git/commits{/sha}","comments_url":"https://api.github.com/repos/refried/doobie/comments{/number}","issue_comment_url":"https://api.github.com/repos/refried/doobie/issues/comments{/number}","contents_url":"https://api.github.com/repos/refried/doobie/contents/{+path}","compare_url":"https://api.github.com/repos/refried/doobie/compare/{base}...{head}","merges_url":"https://api.github.com/repos/refried/doobie/merges","archive_url":"https://api.github.com/repos/refried/doobie/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/refried/doobie/downloads","issues_url":"https://api.github.com/repos/refried/doobie/issues{/number}","pulls_url":"https://api.github.com/repos/refried/doobie/pulls{/number}","milestones_url":"https://api.github.com/repos/refried/doobie/milestones{/number}","notifications_url":"https://api.github.com/repos/refried/doobie/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/refried/doobie/labels{/name}","releases_url":"https://api.github.com/repos/refried/doobie/releases{/id}","deployments_url":"https://api.github.com/repos/refried/doobie/deployments","created_at":"2015-09-26T19:49:09Z","updated_at":"2015-09-26T19:49:11Z","pushed_at":"2016-02-18T01:51:17Z","git_url":"git://github.com/refried/doobie.git","ssh_url":"git@github.com:refried/doobie.git","clone_url":"https://github.com/refried/doobie.git","svn_url":"https://github.com/refried/doobie","homepage":"","size":1400,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"tpolecat:master","ref":"master","sha":"1af70282d7b81a9737c584ce9e8f5a12c8e6da64","user":{"login":"tpolecat","id":1200131,"avatar_url":"https://avatars.githubusercontent.com/u/1200131?v=3","gravatar_id":"","url":"https://api.github.com/users/tpolecat","html_url":"https://github.com/tpolecat","followers_url":"https://api.github.com/users/tpolecat/followers","following_url":"https://api.github.com/users/tpolecat/following{/other_user}","gists_url":"https://api.github.com/users/tpolecat/gists{/gist_id}","starred_url":"https://api.github.com/users/tpolecat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tpolecat/subscriptions","organizations_url":"https://api.github.com/users/tpolecat/orgs","repos_url":"https://api.github.com/users/tpolecat/repos","events_url":"https://api.github.com/users/tpolecat/events{/privacy}","received_events_url":"https://api.github.com/users/tpolecat/received_events","type":"User","site_admin":false},"repo":{"id":14679065,"name":"doobie","full_name":"tpolecat/doobie","owner":{"login":"tpolecat","id":1200131,"avatar_url":"https://avatars.githubusercontent.com/u/1200131?v=3","gravatar_id":"","url":"https://api.github.com/users/tpolecat","html_url":"https://github.com/tpolecat","followers_url":"https://api.github.com/users/tpolecat/followers","following_url":"https://api.github.com/users/tpolecat/following{/other_user}","gists_url":"https://api.github.com/users/tpolecat/gists{/gist_id}","starred_url":"https://api.github.com/users/tpolecat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tpolecat/subscriptions","organizations_url":"https://api.github.com/users/tpolecat/orgs","repos_url":"https://api.github.com/users/tpolecat/repos","events_url":"https://api.github.com/users/tpolecat/events{/privacy}","received_events_url":"https://api.github.com/users/tpolecat/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tpolecat/doobie","description":"principled database access for scala","fork":false,"url":"https://api.github.com/repos/tpolecat/doobie","forks_url":"https://api.github.com/repos/tpolecat/doobie/forks","keys_url":"https://api.github.com/repos/tpolecat/doobie/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tpolecat/doobie/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tpolecat/doobie/teams","hooks_url":"https://api.github.com/repos/tpolecat/doobie/hooks","issue_events_url":"https://api.github.com/repos/tpolecat/doobie/issues/events{/number}","events_url":"https://api.github.com/repos/tpolecat/doobie/events","assignees_url":"https://api.github.com/repos/tpolecat/doobie/assignees{/user}","branches_url":"https://api.github.com/repos/tpolecat/doobie/branches{/branch}","tags_url":"https://api.github.com/repos/tpolecat/doobie/tags","blobs_url":"https://api.github.com/repos/tpolecat/doobie/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tpolecat/doobie/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tpolecat/doobie/git/refs{/sha}","trees_url":"https://api.github.com/repos/tpolecat/doobie/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tpolecat/doobie/statuses/{sha}","languages_url":"https://api.github.com/repos/tpolecat/doobie/languages","stargazers_url":"https://api.github.com/repos/tpolecat/doobie/stargazers","contributors_url":"https://api.github.com/repos/tpolecat/doobie/contributors","subscribers_url":"https://api.github.com/repos/tpolecat/doobie/subscribers","subscription_url":"https://api.github.com/repos/tpolecat/doobie/subscription","commits_url":"https://api.github.com/repos/tpolecat/doobie/commits{/sha}","git_commits_url":"https://api.github.com/repos/tpolecat/doobie/git/commits{/sha}","comments_url":"https://api.github.com/repos/tpolecat/doobie/comments{/number}","issue_comment_url":"https://api.github.com/repos/tpolecat/doobie/issues/comments{/number}","contents_url":"https://api.github.com/repos/tpolecat/doobie/contents/{+path}","compare_url":"https://api.github.com/repos/tpolecat/doobie/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tpolecat/doobie/merges","archive_url":"https://api.github.com/repos/tpolecat/doobie/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tpolecat/doobie/downloads","issues_url":"https://api.github.com/repos/tpolecat/doobie/issues{/number}","pulls_url":"https://api.github.com/repos/tpolecat/doobie/pulls{/number}","milestones_url":"https://api.github.com/repos/tpolecat/doobie/milestones{/number}","notifications_url":"https://api.github.com/repos/tpolecat/doobie/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tpolecat/doobie/labels{/name}","releases_url":"https://api.github.com/repos/tpolecat/doobie/releases{/id}","deployments_url":"https://api.github.com/repos/tpolecat/doobie/deployments","created_at":"2013-11-25T07:25:20Z","updated_at":"2016-02-17T16:57:53Z","pushed_at":"2016-02-18T01:59:49Z","git_url":"git://github.com/tpolecat/doobie.git","ssh_url":"git@github.com:tpolecat/doobie.git","clone_url":"https://github.com/tpolecat/doobie.git","svn_url":"https://github.com/tpolecat/doobie","homepage":"","size":1464,"stargazers_count":389,"watchers_count":389,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":43,"mirror_url":null,"open_issues_count":51,"forks":43,"open_issues":51,"watchers":389,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tpolecat/doobie/pulls/272"},"html":{"href":"https://github.com/tpolecat/doobie/pull/272"},"issue":{"href":"https://api.github.com/repos/tpolecat/doobie/issues/272"},"comments":{"href":"https://api.github.com/repos/tpolecat/doobie/issues/272/comments"},"review_comments":{"href":"https://api.github.com/repos/tpolecat/doobie/pulls/272/comments"},"review_comment":{"href":"https://api.github.com/repos/tpolecat/doobie/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tpolecat/doobie/pulls/272/commits"},"statuses":{"href":"https://api.github.com/repos/tpolecat/doobie/statuses/8fc5d1ad4f1e579408a743cb814e8cb35fcc9192"}}}}