{"action":"created","comment":{"url":"https://api.github.com/repos/mirage/irmin/pulls/comments/190406091","pull_request_review_id":122775872,"id":190406091,"diff_hunk":"@@ -2726,43 +2726,46 @@ let () = Lwt_main.run (test ())\n     We will demonstrate the use of custom merge operators by\n     defining mergeable debug log files. We first define a log entry\n     as a pair of a timestamp and a message, using the combinator\n-    exposed by {{:https://github.com/mirage/mirage-tc}mirage-tc}:\n+    exposed by {!Irmin.Type}:\n \n {[\n-  module Entry = sig\n-    include Irmin.Contents.Conv\n-    val v: string -> t\n-    val compare: t -> t -> int\n-    val timestamp: t -> int\n-  end = struct\n-\n-    type t = { timestamp: int; message : string; }\n-\n-    let compare x y = compare x.timestamp y.timestamp\n-\n-    let v message =\n-      incr time;\n-      { timestamp = !time; message }\n-\n-    let t =\n-      let open Irmin.Type in\n-      record \"entry\" (fun timestamp message -> { timestamp; message })\n-      |+ field \"timestamp\" int    (fun t -> t.timestamp)\n-      |+ field \"message\"   string (fun t -> t.message)\n-      |> sealr\n-\n-    let timestamp t = t.timestamp\n-\n-    let pp ppf { timestamp; message } =\n-      Fmt.pf ppf  \"%04d: %s\\n\" timestamp message\n-\n-    let of_string str =\n-      match String.cut ~sep:\": \" str with\n-      | None -> Error (`Msg (\"invalid entry: \" ^ str))\n-      | Some (x, message) ->\n-        try Ok { timestamp = int_of_string x; message }\n-        with Failure e -> Error (`Msg e)\n-  end\n+module Entry : sig\n+  include Irmin.Contents.Conv\n+  val v: string -> t\n+  val compare: t -> t -> int\n+  val timestamp: t -> int\n+end = struct\n+\n+  type t = { timestamp: int; message : string; }\n+\n+  let compare x y = compare x.timestamp y.timestamp\n+\n+  let time = ref 0\n+\n+  let v message =\n+    incr time;\n+    { timestamp = !time; message }\n+\n+  let t =\n+    let open Irmin.Type in\n+    record \"entry\" (fun t32 message -> { timestamp = Int32.to_int t32; message })","path":"src/irmin/irmin.mli","position":61,"original_position":61,"commit_id":"f61986f83908239daf9408a936781c1b7c32ded6","original_commit_id":"f61986f83908239daf9408a936781c1b7c32ded6","user":{"login":"samoht","id":103693,"avatar_url":"https://avatars0.githubusercontent.com/u/103693?v=4","gravatar_id":"","url":"https://api.github.com/users/samoht","html_url":"https://github.com/samoht","followers_url":"https://api.github.com/users/samoht/followers","following_url":"https://api.github.com/users/samoht/following{/other_user}","gists_url":"https://api.github.com/users/samoht/gists{/gist_id}","starred_url":"https://api.github.com/users/samoht/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samoht/subscriptions","organizations_url":"https://api.github.com/users/samoht/orgs","repos_url":"https://api.github.com/users/samoht/repos","events_url":"https://api.github.com/users/samoht/events{/privacy}","received_events_url":"https://api.github.com/users/samoht/received_events","type":"User","site_admin":false},"body":"Ha yes, I completely forgot about the removal of the `int` combinator. Thanks for the reminders :-) So your changes make perfect sense.","created_at":"2018-05-23T21:34:06Z","updated_at":"2018-05-23T21:34:06Z","html_url":"https://github.com/mirage/irmin/pull/506#discussion_r190406091","pull_request_url":"https://api.github.com/repos/mirage/irmin/pulls/506","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/mirage/irmin/pulls/comments/190406091"},"html":{"href":"https://github.com/mirage/irmin/pull/506#discussion_r190406091"},"pull_request":{"href":"https://api.github.com/repos/mirage/irmin/pulls/506"}},"in_reply_to_id":190275362},"pull_request":{"url":"https://api.github.com/repos/mirage/irmin/pulls/506","id":189918624,"html_url":"https://github.com/mirage/irmin/pull/506","diff_url":"https://github.com/mirage/irmin/pull/506.diff","patch_url":"https://github.com/mirage/irmin/pull/506.patch","issue_url":"https://api.github.com/repos/mirage/irmin/issues/506","number":506,"state":"open","locked":false,"title":"update mergable log example in docs","user":{"login":"atstp","id":5891072,"avatar_url":"https://avatars0.githubusercontent.com/u/5891072?v=4","gravatar_id":"","url":"https://api.github.com/users/atstp","html_url":"https://github.com/atstp","followers_url":"https://api.github.com/users/atstp/followers","following_url":"https://api.github.com/users/atstp/following{/other_user}","gists_url":"https://api.github.com/users/atstp/gists{/gist_id}","starred_url":"https://api.github.com/users/atstp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atstp/subscriptions","organizations_url":"https://api.github.com/users/atstp/orgs","repos_url":"https://api.github.com/users/atstp/repos","events_url":"https://api.github.com/users/atstp/events{/privacy}","received_events_url":"https://api.github.com/users/atstp/received_events","type":"User","site_admin":false},"body":"reference `Irmin.Type` instead of `mirage-tc` and restore example to running condition","created_at":"2018-05-23T09:56:44Z","updated_at":"2018-05-23T21:34:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ff74ec4c5aaaa29eb4fdf1d3820196046595948c","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/mirage/irmin/pulls/506/commits","review_comments_url":"https://api.github.com/repos/mirage/irmin/pulls/506/comments","review_comment_url":"https://api.github.com/repos/mirage/irmin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mirage/irmin/issues/506/comments","statuses_url":"https://api.github.com/repos/mirage/irmin/statuses/f61986f83908239daf9408a936781c1b7c32ded6","head":{"label":"atstp:update-mergeable-log-example","ref":"update-mergeable-log-example","sha":"f61986f83908239daf9408a936781c1b7c32ded6","user":{"login":"atstp","id":5891072,"avatar_url":"https://avatars0.githubusercontent.com/u/5891072?v=4","gravatar_id":"","url":"https://api.github.com/users/atstp","html_url":"https://github.com/atstp","followers_url":"https://api.github.com/users/atstp/followers","following_url":"https://api.github.com/users/atstp/following{/other_user}","gists_url":"https://api.github.com/users/atstp/gists{/gist_id}","starred_url":"https://api.github.com/users/atstp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atstp/subscriptions","organizations_url":"https://api.github.com/users/atstp/orgs","repos_url":"https://api.github.com/users/atstp/repos","events_url":"https://api.github.com/users/atstp/events{/privacy}","received_events_url":"https://api.github.com/users/atstp/received_events","type":"User","site_admin":false},"repo":{"id":132209839,"name":"irmin","full_name":"atstp/irmin","owner":{"login":"atstp","id":5891072,"avatar_url":"https://avatars0.githubusercontent.com/u/5891072?v=4","gravatar_id":"","url":"https://api.github.com/users/atstp","html_url":"https://github.com/atstp","followers_url":"https://api.github.com/users/atstp/followers","following_url":"https://api.github.com/users/atstp/following{/other_user}","gists_url":"https://api.github.com/users/atstp/gists{/gist_id}","starred_url":"https://api.github.com/users/atstp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atstp/subscriptions","organizations_url":"https://api.github.com/users/atstp/orgs","repos_url":"https://api.github.com/users/atstp/repos","events_url":"https://api.github.com/users/atstp/events{/privacy}","received_events_url":"https://api.github.com/users/atstp/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/atstp/irmin","description":"Irmin is a distributed database that follows the same design principles as Git","fork":true,"url":"https://api.github.com/repos/atstp/irmin","forks_url":"https://api.github.com/repos/atstp/irmin/forks","keys_url":"https://api.github.com/repos/atstp/irmin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/atstp/irmin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/atstp/irmin/teams","hooks_url":"https://api.github.com/repos/atstp/irmin/hooks","issue_events_url":"https://api.github.com/repos/atstp/irmin/issues/events{/number}","events_url":"https://api.github.com/repos/atstp/irmin/events","assignees_url":"https://api.github.com/repos/atstp/irmin/assignees{/user}","branches_url":"https://api.github.com/repos/atstp/irmin/branches{/branch}","tags_url":"https://api.github.com/repos/atstp/irmin/tags","blobs_url":"https://api.github.com/repos/atstp/irmin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/atstp/irmin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/atstp/irmin/git/refs{/sha}","trees_url":"https://api.github.com/repos/atstp/irmin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/atstp/irmin/statuses/{sha}","languages_url":"https://api.github.com/repos/atstp/irmin/languages","stargazers_url":"https://api.github.com/repos/atstp/irmin/stargazers","contributors_url":"https://api.github.com/repos/atstp/irmin/contributors","subscribers_url":"https://api.github.com/repos/atstp/irmin/subscribers","subscription_url":"https://api.github.com/repos/atstp/irmin/subscription","commits_url":"https://api.github.com/repos/atstp/irmin/commits{/sha}","git_commits_url":"https://api.github.com/repos/atstp/irmin/git/commits{/sha}","comments_url":"https://api.github.com/repos/atstp/irmin/comments{/number}","issue_comment_url":"https://api.github.com/repos/atstp/irmin/issues/comments{/number}","contents_url":"https://api.github.com/repos/atstp/irmin/contents/{+path}","compare_url":"https://api.github.com/repos/atstp/irmin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/atstp/irmin/merges","archive_url":"https://api.github.com/repos/atstp/irmin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/atstp/irmin/downloads","issues_url":"https://api.github.com/repos/atstp/irmin/issues{/number}","pulls_url":"https://api.github.com/repos/atstp/irmin/pulls{/number}","milestones_url":"https://api.github.com/repos/atstp/irmin/milestones{/number}","notifications_url":"https://api.github.com/repos/atstp/irmin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/atstp/irmin/labels{/name}","releases_url":"https://api.github.com/repos/atstp/irmin/releases{/id}","deployments_url":"https://api.github.com/repos/atstp/irmin/deployments","created_at":"2018-05-05T03:06:44Z","updated_at":"2018-05-05T03:06:46Z","pushed_at":"2018-05-23T09:54:11Z","git_url":"git://github.com/atstp/irmin.git","ssh_url":"git@github.com:atstp/irmin.git","clone_url":"https://github.com/atstp/irmin.git","svn_url":"https://github.com/atstp/irmin","homepage":"","size":8548,"stargazers_count":0,"watchers_count":0,"language":"OCaml","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"isc","name":"ISC License","spdx_id":"ISC","url":"https://api.github.com/licenses/isc"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mirage:master","ref":"master","sha":"a788144631fac5a45321f0e850860a8edcff6ad5","user":{"login":"mirage","id":131943,"avatar_url":"https://avatars3.githubusercontent.com/u/131943?v=4","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":9595928,"name":"irmin","full_name":"mirage/irmin","owner":{"login":"mirage","id":131943,"avatar_url":"https://avatars3.githubusercontent.com/u/131943?v=4","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/irmin","description":"Irmin is a distributed database that follows the same design principles as Git","fork":false,"url":"https://api.github.com/repos/mirage/irmin","forks_url":"https://api.github.com/repos/mirage/irmin/forks","keys_url":"https://api.github.com/repos/mirage/irmin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mirage/irmin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mirage/irmin/teams","hooks_url":"https://api.github.com/repos/mirage/irmin/hooks","issue_events_url":"https://api.github.com/repos/mirage/irmin/issues/events{/number}","events_url":"https://api.github.com/repos/mirage/irmin/events","assignees_url":"https://api.github.com/repos/mirage/irmin/assignees{/user}","branches_url":"https://api.github.com/repos/mirage/irmin/branches{/branch}","tags_url":"https://api.github.com/repos/mirage/irmin/tags","blobs_url":"https://api.github.com/repos/mirage/irmin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mirage/irmin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mirage/irmin/git/refs{/sha}","trees_url":"https://api.github.com/repos/mirage/irmin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mirage/irmin/statuses/{sha}","languages_url":"https://api.github.com/repos/mirage/irmin/languages","stargazers_url":"https://api.github.com/repos/mirage/irmin/stargazers","contributors_url":"https://api.github.com/repos/mirage/irmin/contributors","subscribers_url":"https://api.github.com/repos/mirage/irmin/subscribers","subscription_url":"https://api.github.com/repos/mirage/irmin/subscription","commits_url":"https://api.github.com/repos/mirage/irmin/commits{/sha}","git_commits_url":"https://api.github.com/repos/mirage/irmin/git/commits{/sha}","comments_url":"https://api.github.com/repos/mirage/irmin/comments{/number}","issue_comment_url":"https://api.github.com/repos/mirage/irmin/issues/comments{/number}","contents_url":"https://api.github.com/repos/mirage/irmin/contents/{+path}","compare_url":"https://api.github.com/repos/mirage/irmin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mirage/irmin/merges","archive_url":"https://api.github.com/repos/mirage/irmin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mirage/irmin/downloads","issues_url":"https://api.github.com/repos/mirage/irmin/issues{/number}","pulls_url":"https://api.github.com/repos/mirage/irmin/pulls{/number}","milestones_url":"https://api.github.com/repos/mirage/irmin/milestones{/number}","notifications_url":"https://api.github.com/repos/mirage/irmin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mirage/irmin/labels{/name}","releases_url":"https://api.github.com/repos/mirage/irmin/releases{/id}","deployments_url":"https://api.github.com/repos/mirage/irmin/deployments","created_at":"2013-04-22T09:52:58Z","updated_at":"2018-05-22T15:43:13Z","pushed_at":"2018-05-23T09:56:44Z","git_url":"git://github.com/mirage/irmin.git","ssh_url":"git@github.com:mirage/irmin.git","clone_url":"https://github.com/mirage/irmin.git","svn_url":"https://github.com/mirage/irmin","homepage":"","size":8547,"stargazers_count":872,"watchers_count":872,"language":"OCaml","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":78,"mirror_url":null,"archived":false,"open_issues_count":46,"license":{"key":"isc","name":"ISC License","spdx_id":"ISC","url":"https://api.github.com/licenses/isc"},"forks":78,"open_issues":46,"watchers":872,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mirage/irmin/pulls/506"},"html":{"href":"https://github.com/mirage/irmin/pull/506"},"issue":{"href":"https://api.github.com/repos/mirage/irmin/issues/506"},"comments":{"href":"https://api.github.com/repos/mirage/irmin/issues/506/comments"},"review_comments":{"href":"https://api.github.com/repos/mirage/irmin/pulls/506/comments"},"review_comment":{"href":"https://api.github.com/repos/mirage/irmin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mirage/irmin/pulls/506/commits"},"statuses":{"href":"https://api.github.com/repos/mirage/irmin/statuses/f61986f83908239daf9408a936781c1b7c32ded6"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"samoht"}}