{"action":"closed","issue":{"url":"https://api.github.com/repos/janestreet/bin_prot/issues/18","repository_url":"https://api.github.com/repos/janestreet/bin_prot","labels_url":"https://api.github.com/repos/janestreet/bin_prot/issues/18/labels{/name}","comments_url":"https://api.github.com/repos/janestreet/bin_prot/issues/18/comments","events_url":"https://api.github.com/repos/janestreet/bin_prot/issues/18/events","html_url":"https://github.com/janestreet/bin_prot/issues/18","id":309227468,"node_id":"MDU6SXNzdWUzMDkyMjc0Njg=","number":18,"title":"Incompatible types in generated functions for complex types","user":{"login":"pbiggar","id":181762,"node_id":"MDQ6VXNlcjE4MTc2Mg==","avatar_url":"https://avatars0.githubusercontent.com/u/181762?v=4","gravatar_id":"","url":"https://api.github.com/users/pbiggar","html_url":"https://github.com/pbiggar","followers_url":"https://api.github.com/users/pbiggar/followers","following_url":"https://api.github.com/users/pbiggar/following{/other_user}","gists_url":"https://api.github.com/users/pbiggar/gists{/gist_id}","starred_url":"https://api.github.com/users/pbiggar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pbiggar/subscriptions","organizations_url":"https://api.github.com/users/pbiggar/orgs","repos_url":"https://api.github.com/users/pbiggar/repos","events_url":"https://api.github.com/users/pbiggar/events{/privacy}","received_events_url":"https://api.github.com/users/pbiggar/received_events","type":"User","site_admin":false},"labels":[{"id":26580947,"node_id":"MDU6TGFiZWwyNjU4MDk0Nw==","url":"https://api.github.com/repos/janestreet/bin_prot/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2018-03-28T05:37:48Z","updated_at":"2018-12-05T18:42:26Z","closed_at":"2018-12-05T18:42:25Z","author_association":"NONE","body":"I'm getting a weird error with a type I want to derive bin_prot functions from. I've been using bin_prot for a few months on all my types without problems otherwise. This is a fairly minimized version. The problem come from `(int abc)` in `N`, but only with the `ndt` and `dt` definitions. Removing almost anything will make the code compile fine.\r\n\r\n```\r\ntype 'x abc = M\r\n              | N of (int abc) * 'x abc\r\n              [@@deriving bin_io]\r\n\r\nand ndt = O [@@deriving bin_io]\r\nand dt = ndt abc [@@deriving bin_io]\r\n```\r\n\r\nThe error is:\r\n```\r\nError: This expression has type ndt -> int\r\n       but an expression was expected of type\r\n         Core_kernel__.Import.int Bin_prot.Size.sizer =\r\n           Core_kernel__.Import.int -> int\r\n       Type ndt is not compatible with type Core_kernel__.Import.int = int\r\n```\r\n\r\nI'm using ocaml 4.06.0, with Core 0.11 (same problem in Core 0.10, I upgraded to avoid the problem). Building with jbuilder 1.0+beta19.1, core, core_extended, ppx_bin_prot all 0.11, ppx_deriving 4.2.1.\r\n\r\nAny ideas what's going wrong?"}}
{"actor":{"display_login":"pbiggar"}}