{"action":"created","comment":{"url":"https://api.github.com/repos/mirage/ocaml-dns/pulls/comments/27404340","id":27404340,"diff_hunk":"@@ -21,43 +23,62 @@\n     @author Richard Mortier <mort\\@cantab.net> (documentation)\n *)\n \n-open Cstruct\n-\n (** DNS label, including pointer and zero. *)\n type label\n \n-(** Domain name, as a list of strings. *)\n-type domain_name = string list\n+(** Domain name, as a list of labels ordered from the leaf to the root. *)\n+type t\n+\n+(** Lookup key for the {! Trie}. *)\n+type key = string\n \n (** Domain name map *)\n-module Map: Map.S with type key = domain_name\n+module Map: Map.S with type key = t\n+\n+(** [empty] is the empty {! t}. *)\n+val empty: t\n+\n+(** [to_string_list name] is the label list corresponding to [name]. *)\n+val to_string_list : t -> string list\n+\n+(** [of_string_list slist] is the domain name corresponding to label\n+    list [slist]. *)\n+val of_string_list : string list -> t\n \n-(** Render a {! domain_name} to a simple string. *)\n-val domain_name_to_string : domain_name -> string\n+(** [append a b] is the domain name of the concatenation of [a] and [b]. *)\n+val append: t -> t -> t\n \n-(** Convert a standard domain {! string} to a {! domain_name}. *)\n-val string_to_domain_name : string -> domain_name\n+(** [cons label name] is the domain name with subdomain [label] under [name]. *)\n+val cons: string -> t -> t\n \n-(** Construct name for reverse lookup given an IPv4 address. *)\n-val for_reverse : Ipaddr.V4.t -> domain_name\n+(** [to_string name] is the normal, human-readable string\n+    serialization of [name] without the trailing dot. *)\n+val to_string : t -> string\n \n-(** Parse a {! domain_name} out of a {! Cstruct.t} given a set of already\n+(** [of_string name] is the domain name parsed out of the normal,\n+    human-readable serialization [name]. *)\n+val of_string : string -> t\n+\n+(** [for_reverse ip] is the name used for reverse lookup of IP address [ip]. *)\n+val for_reverse : Ipaddr.t -> t","path":"lib/name.mli","position":null,"original_position":62,"commit_id":"395b49b96355c0e4842664fc9fa153ff1f9c1891","original_commit_id":"7f73b5d664ed66786e8f1ced680f00882c9dfb51","user":{"login":"dsheets","id":59918,"avatar_url":"https://avatars.githubusercontent.com/u/59918?v=3","gravatar_id":"","url":"https://api.github.com/users/dsheets","html_url":"https://github.com/dsheets","followers_url":"https://api.github.com/users/dsheets/followers","following_url":"https://api.github.com/users/dsheets/following{/other_user}","gists_url":"https://api.github.com/users/dsheets/gists{/gist_id}","starred_url":"https://api.github.com/users/dsheets/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dsheets/subscriptions","organizations_url":"https://api.github.com/users/dsheets/orgs","repos_url":"https://api.github.com/users/dsheets/repos","events_url":"https://api.github.com/users/dsheets/events{/privacy}","received_events_url":"https://api.github.com/users/dsheets/received_events","type":"User","site_admin":false},"body":"Totally agree. It's changed now.","created_at":"2015-03-30T16:08:28Z","updated_at":"2015-03-30T16:08:28Z","html_url":"https://github.com/mirage/ocaml-dns/pull/64#discussion_r27404340","pull_request_url":"https://api.github.com/repos/mirage/ocaml-dns/pulls/64","_links":{"self":{"href":"https://api.github.com/repos/mirage/ocaml-dns/pulls/comments/27404340"},"html":{"href":"https://github.com/mirage/ocaml-dns/pull/64#discussion_r27404340"},"pull_request":{"href":"https://api.github.com/repos/mirage/ocaml-dns/pulls/64"}}},"pull_request":{"url":"https://api.github.com/repos/mirage/ocaml-dns/pulls/64","id":32220512,"html_url":"https://github.com/mirage/ocaml-dns/pull/64","diff_url":"https://github.com/mirage/ocaml-dns/pull/64.diff","patch_url":"https://github.com/mirage/ocaml-dns/pull/64.patch","issue_url":"https://api.github.com/repos/mirage/ocaml-dns/issues/64","number":64,"state":"open","locked":false,"title":"Rationalize and encapsulate Name","user":{"login":"dsheets","id":59918,"avatar_url":"https://avatars.githubusercontent.com/u/59918?v=3","gravatar_id":"","url":"https://api.github.com/users/dsheets","html_url":"https://github.com/dsheets","followers_url":"https://api.github.com/users/dsheets/followers","following_url":"https://api.github.com/users/dsheets/following{/other_user}","gists_url":"https://api.github.com/users/dsheets/gists{/gist_id}","starred_url":"https://api.github.com/users/dsheets/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dsheets/subscriptions","organizations_url":"https://api.github.com/users/dsheets/orgs","repos_url":"https://api.github.com/users/dsheets/repos","events_url":"https://api.github.com/users/dsheets/events{/privacy}","received_events_url":"https://api.github.com/users/dsheets/received_events","type":"User","site_admin":false},"body":"This patchset attempts to rationalize the interface `Name` by incorporating @heidi-ann's #52 and then renaming many of the exposed values in `Name` to make them shorter while discouraging the `open`ing of `Name`. I also rewrote some of the documentation in `Name` and updated all the internal dependencies.\r\n\r\n`Name.for_reverse` also changed signature and now can create `PTR` names for IPv4 or IPv6 addresses. This requires a minimum version of `Ipaddr` of 2.6.0.\r\n\r\nI also did some general clean-up of `open Cstruct` as `Cstruct` has a type `t`.\r\n\r\nI would really appreciate review of the new `Name` interface as I'm keen to break it as few times as possible. Thanks!","created_at":"2015-03-30T12:12:27Z","updated_at":"2015-03-30T16:08:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8dd1e0014a585a3894669766dac0ac8553b43a6d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mirage/ocaml-dns/pulls/64/commits","review_comments_url":"https://api.github.com/repos/mirage/ocaml-dns/pulls/64/comments","review_comment_url":"https://api.github.com/repos/mirage/ocaml-dns/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mirage/ocaml-dns/issues/64/comments","statuses_url":"https://api.github.com/repos/mirage/ocaml-dns/statuses/395b49b96355c0e4842664fc9fa153ff1f9c1891","head":{"label":"dsheets:qname-patch","ref":"qname-patch","sha":"395b49b96355c0e4842664fc9fa153ff1f9c1891","user":{"login":"dsheets","id":59918,"avatar_url":"https://avatars.githubusercontent.com/u/59918?v=3","gravatar_id":"","url":"https://api.github.com/users/dsheets","html_url":"https://github.com/dsheets","followers_url":"https://api.github.com/users/dsheets/followers","following_url":"https://api.github.com/users/dsheets/following{/other_user}","gists_url":"https://api.github.com/users/dsheets/gists{/gist_id}","starred_url":"https://api.github.com/users/dsheets/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dsheets/subscriptions","organizations_url":"https://api.github.com/users/dsheets/orgs","repos_url":"https://api.github.com/users/dsheets/repos","events_url":"https://api.github.com/users/dsheets/events{/privacy}","received_events_url":"https://api.github.com/users/dsheets/received_events","type":"User","site_admin":false},"repo":{"id":11210327,"name":"ocaml-dns","full_name":"dsheets/ocaml-dns","owner":{"login":"dsheets","id":59918,"avatar_url":"https://avatars.githubusercontent.com/u/59918?v=3","gravatar_id":"","url":"https://api.github.com/users/dsheets","html_url":"https://github.com/dsheets","followers_url":"https://api.github.com/users/dsheets/followers","following_url":"https://api.github.com/users/dsheets/following{/other_user}","gists_url":"https://api.github.com/users/dsheets/gists{/gist_id}","starred_url":"https://api.github.com/users/dsheets/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dsheets/subscriptions","organizations_url":"https://api.github.com/users/dsheets/orgs","repos_url":"https://api.github.com/users/dsheets/repos","events_url":"https://api.github.com/users/dsheets/events{/privacy}","received_events_url":"https://api.github.com/users/dsheets/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dsheets/ocaml-dns","description":"OCaml implementation of the DNS protocol","fork":true,"url":"https://api.github.com/repos/dsheets/ocaml-dns","forks_url":"https://api.github.com/repos/dsheets/ocaml-dns/forks","keys_url":"https://api.github.com/repos/dsheets/ocaml-dns/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dsheets/ocaml-dns/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dsheets/ocaml-dns/teams","hooks_url":"https://api.github.com/repos/dsheets/ocaml-dns/hooks","issue_events_url":"https://api.github.com/repos/dsheets/ocaml-dns/issues/events{/number}","events_url":"https://api.github.com/repos/dsheets/ocaml-dns/events","assignees_url":"https://api.github.com/repos/dsheets/ocaml-dns/assignees{/user}","branches_url":"https://api.github.com/repos/dsheets/ocaml-dns/branches{/branch}","tags_url":"https://api.github.com/repos/dsheets/ocaml-dns/tags","blobs_url":"https://api.github.com/repos/dsheets/ocaml-dns/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dsheets/ocaml-dns/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dsheets/ocaml-dns/git/refs{/sha}","trees_url":"https://api.github.com/repos/dsheets/ocaml-dns/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dsheets/ocaml-dns/statuses/{sha}","languages_url":"https://api.github.com/repos/dsheets/ocaml-dns/languages","stargazers_url":"https://api.github.com/repos/dsheets/ocaml-dns/stargazers","contributors_url":"https://api.github.com/repos/dsheets/ocaml-dns/contributors","subscribers_url":"https://api.github.com/repos/dsheets/ocaml-dns/subscribers","subscription_url":"https://api.github.com/repos/dsheets/ocaml-dns/subscription","commits_url":"https://api.github.com/repos/dsheets/ocaml-dns/commits{/sha}","git_commits_url":"https://api.github.com/repos/dsheets/ocaml-dns/git/commits{/sha}","comments_url":"https://api.github.com/repos/dsheets/ocaml-dns/comments{/number}","issue_comment_url":"https://api.github.com/repos/dsheets/ocaml-dns/issues/comments{/number}","contents_url":"https://api.github.com/repos/dsheets/ocaml-dns/contents/{+path}","compare_url":"https://api.github.com/repos/dsheets/ocaml-dns/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dsheets/ocaml-dns/merges","archive_url":"https://api.github.com/repos/dsheets/ocaml-dns/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dsheets/ocaml-dns/downloads","issues_url":"https://api.github.com/repos/dsheets/ocaml-dns/issues{/number}","pulls_url":"https://api.github.com/repos/dsheets/ocaml-dns/pulls{/number}","milestones_url":"https://api.github.com/repos/dsheets/ocaml-dns/milestones{/number}","notifications_url":"https://api.github.com/repos/dsheets/ocaml-dns/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dsheets/ocaml-dns/labels{/name}","releases_url":"https://api.github.com/repos/dsheets/ocaml-dns/releases{/id}","created_at":"2013-07-05T23:44:23Z","updated_at":"2015-03-30T12:00:57Z","pushed_at":"2015-03-30T16:07:47Z","git_url":"git://github.com/dsheets/ocaml-dns.git","ssh_url":"git@github.com:dsheets/ocaml-dns.git","clone_url":"https://github.com/dsheets/ocaml-dns.git","svn_url":"https://github.com/dsheets/ocaml-dns","homepage":"","size":1281,"stargazers_count":2,"watchers_count":2,"language":"OCaml","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":2,"default_branch":"master"}},"base":{"label":"mirage:master","ref":"master","sha":"010bbbb7d4f23d68f6de7398813eda81eede6db1","user":{"login":"mirage","id":131943,"avatar_url":"https://avatars.githubusercontent.com/u/131943?v=3","gravatar_id":"","url":"https://api.github.com/users/mirage","html_url":"https://github.com/mirage","followers_url":"https://api.github.com/users/mirage/followers","following_url":"https://api.github.com/users/mirage/following{/other_user}","gists_url":"https://api.github.com/users/mirage/gists{/gist_id}","starred_url":"https://api.github.com/users/mirage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mirage/subscriptions","organizations_url":"https://api.github.com/users/mirage/orgs","repos_url":"https://api.github.com/users/mirage/repos","events_url":"https://api.github.com/users/mirage/events{/privacy}","received_events_url":"https://api.github.com/users/mirage/received_events","type":"Organization","site_admin":false},"repo":{"id":3141834,"name":"ocaml-dns","full_name":"mirage/ocaml-dns","owner":{"login":"mirage","id":131943,"avatar_url":"https://avatars.githubusercontent.com/u/131943?v=3","gravatar_id":"","url":"https://api.github.com/users/mirage","html_url":"https://github.com/mirage","followers_url":"https://api.github.com/users/mirage/followers","following_url":"https://api.github.com/users/mirage/following{/other_user}","gists_url":"https://api.github.com/users/mirage/gists{/gist_id}","starred_url":"https://api.github.com/users/mirage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mirage/subscriptions","organizations_url":"https://api.github.com/users/mirage/orgs","repos_url":"https://api.github.com/users/mirage/repos","events_url":"https://api.github.com/users/mirage/events{/privacy}","received_events_url":"https://api.github.com/users/mirage/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mirage/ocaml-dns","description":"OCaml implementation of the DNS protocol","fork":false,"url":"https://api.github.com/repos/mirage/ocaml-dns","forks_url":"https://api.github.com/repos/mirage/ocaml-dns/forks","keys_url":"https://api.github.com/repos/mirage/ocaml-dns/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mirage/ocaml-dns/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mirage/ocaml-dns/teams","hooks_url":"https://api.github.com/repos/mirage/ocaml-dns/hooks","issue_events_url":"https://api.github.com/repos/mirage/ocaml-dns/issues/events{/number}","events_url":"https://api.github.com/repos/mirage/ocaml-dns/events","assignees_url":"https://api.github.com/repos/mirage/ocaml-dns/assignees{/user}","branches_url":"https://api.github.com/repos/mirage/ocaml-dns/branches{/branch}","tags_url":"https://api.github.com/repos/mirage/ocaml-dns/tags","blobs_url":"https://api.github.com/repos/mirage/ocaml-dns/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mirage/ocaml-dns/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mirage/ocaml-dns/git/refs{/sha}","trees_url":"https://api.github.com/repos/mirage/ocaml-dns/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mirage/ocaml-dns/statuses/{sha}","languages_url":"https://api.github.com/repos/mirage/ocaml-dns/languages","stargazers_url":"https://api.github.com/repos/mirage/ocaml-dns/stargazers","contributors_url":"https://api.github.com/repos/mirage/ocaml-dns/contributors","subscribers_url":"https://api.github.com/repos/mirage/ocaml-dns/subscribers","subscription_url":"https://api.github.com/repos/mirage/ocaml-dns/subscription","commits_url":"https://api.github.com/repos/mirage/ocaml-dns/commits{/sha}","git_commits_url":"https://api.github.com/repos/mirage/ocaml-dns/git/commits{/sha}","comments_url":"https://api.github.com/repos/mirage/ocaml-dns/comments{/number}","issue_comment_url":"https://api.github.com/repos/mirage/ocaml-dns/issues/comments{/number}","contents_url":"https://api.github.com/repos/mirage/ocaml-dns/contents/{+path}","compare_url":"https://api.github.com/repos/mirage/ocaml-dns/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mirage/ocaml-dns/merges","archive_url":"https://api.github.com/repos/mirage/ocaml-dns/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mirage/ocaml-dns/downloads","issues_url":"https://api.github.com/repos/mirage/ocaml-dns/issues{/number}","pulls_url":"https://api.github.com/repos/mirage/ocaml-dns/pulls{/number}","milestones_url":"https://api.github.com/repos/mirage/ocaml-dns/milestones{/number}","notifications_url":"https://api.github.com/repos/mirage/ocaml-dns/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mirage/ocaml-dns/labels{/name}","releases_url":"https://api.github.com/repos/mirage/ocaml-dns/releases{/id}","created_at":"2012-01-10T01:38:53Z","updated_at":"2015-03-30T08:14:35Z","pushed_at":"2015-03-30T16:07:48Z","git_url":"git://github.com/mirage/ocaml-dns.git","ssh_url":"git@github.com:mirage/ocaml-dns.git","clone_url":"https://github.com/mirage/ocaml-dns.git","svn_url":"https://github.com/mirage/ocaml-dns","homepage":"","size":2211,"stargazers_count":23,"watchers_count":23,"language":"OCaml","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":17,"mirror_url":null,"open_issues_count":20,"forks":17,"open_issues":20,"watchers":23,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mirage/ocaml-dns/pulls/64"},"html":{"href":"https://github.com/mirage/ocaml-dns/pull/64"},"issue":{"href":"https://api.github.com/repos/mirage/ocaml-dns/issues/64"},"comments":{"href":"https://api.github.com/repos/mirage/ocaml-dns/issues/64/comments"},"review_comments":{"href":"https://api.github.com/repos/mirage/ocaml-dns/pulls/64/comments"},"review_comment":{"href":"https://api.github.com/repos/mirage/ocaml-dns/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mirage/ocaml-dns/pulls/64/commits"},"statuses":{"href":"https://api.github.com/repos/mirage/ocaml-dns/statuses/395b49b96355c0e4842664fc9fa153ff1f9c1891"}}}}