{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/flow/issues/1231","labels_url":"https://api.github.com/repos/facebook/flow/issues/1231/labels{/name}","comments_url":"https://api.github.com/repos/facebook/flow/issues/1231/comments","events_url":"https://api.github.com/repos/facebook/flow/issues/1231/events","html_url":"https://github.com/facebook/flow/issues/1231","id":124393432,"number":1231,"title":"some incompatible instantiation errors - flow error or my error ?","user":{"login":"Gozala","id":21236,"avatar_url":"https://avatars.githubusercontent.com/u/21236?v=3","gravatar_id":"","url":"https://api.github.com/users/Gozala","html_url":"https://github.com/Gozala","followers_url":"https://api.github.com/users/Gozala/followers","following_url":"https://api.github.com/users/Gozala/following{/other_user}","gists_url":"https://api.github.com/users/Gozala/gists{/gist_id}","starred_url":"https://api.github.com/users/Gozala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gozala/subscriptions","organizations_url":"https://api.github.com/users/Gozala/orgs","repos_url":"https://api.github.com/users/Gozala/repos","events_url":"https://api.github.com/users/Gozala/events{/privacy}","received_events_url":"https://api.github.com/users/Gozala/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-30T20:01:52Z","updated_at":"2015-12-30T20:03:08Z","closed_at":null,"body":"Following code produces errors you see below I do personally fail to see what's working with my code if it is an issue with my code.\r\n\r\n## `src/scratch.js`\r\n\r\n```js\r\n/* @flow */\r\n\r\ntype None =\r\n  { type: \"Effects.None\" }\r\n\r\ntype Batch <action> =\r\n  { type: \"Effects.Batch\"\r\n  , effects: Array<Effects<action>>\r\n  }\r\n\r\ntype Run <action> =\r\n  (callback:(result:action) => void) =>\r\n  void\r\n\r\ntype Task <action> =\r\n  { type: \"Effects.Task\"\r\n  , run: Run<action>\r\n  }\r\n\r\ntype Effects <action>\r\n  = None\r\n  | Batch <action>\r\n  | Task <action>\r\n\r\ntype Selector <item> =\r\n  Array<item>\r\n\r\ntype Is <item> = (item:item) => boolean\r\ntype UpdateItem <item, action> = (item:item) =>\r\n  [item, Effects<action>]\r\n\r\nconst none = {type: \"Effects.None\"}\r\nconst task = <action> (run:Run<action>) =>\r\n  ( { type: \"Effects.Task\"\r\n    , run: run\r\n    }\r\n  )\r\n\r\nconst batch = <action> (effects:Array<Effects<action>>) =>\r\n  ( { type: \"Effects.Batch\"\r\n    , effects: effects\r\n    }\r\n  )\r\n\r\ntype Move = <item, action>\r\n  (isMarked:Is<item>, mark:UpdateItem<item, action>, unmark:UpdateItem<item, action>) =>\r\n  (selector:Selector<item>, isTarget:Is<item>) =>\r\n  [Selector<item>, Effects<action>];\r\n\r\n\r\nexport const move:Move =\r\n  (isMarked, mark, unmark) =>\r\n  (selector, isTarget) => {\r\n  const [items, effects] =\r\n    selector.reduce\r\n    ( ([items, effects], item) => {\r\n        const [next, fx] =\r\n          ( isTarget(item)\r\n          ? mark(item)\r\n          : isMarked(item)\r\n          ? unmark(item)\r\n          : [item, none]\r\n          );\r\n\r\n        items.push(next)\r\n        effects.push(fx)\r\n\r\n        return [items, effects]\r\n      }\r\n    , [[], []]\r\n    );\r\n\r\n    return [items, batch(effects)];\r\n  };\r\n```\r\n\r\n## `stdout`\r\n\r\n```\r\nsrc/sratch.js:45\r\n 45: type Move = <item, action>\r\n                  ^^^^ item. This type is incompatible with\r\n 52:   (isMarked, mark, unmark) =>\r\n       ^ some incompatible instantiation of `item`\r\n\r\n\r\nFound 1 error\r\n```"},"comment":{"url":"https://api.github.com/repos/facebook/flow/issues/comments/168065215","html_url":"https://github.com/facebook/flow/issues/1231#issuecomment-168065215","issue_url":"https://api.github.com/repos/facebook/flow/issues/1231","id":168065215,"user":{"login":"Gozala","id":21236,"avatar_url":"https://avatars.githubusercontent.com/u/21236?v=3","gravatar_id":"","url":"https://api.github.com/users/Gozala","html_url":"https://github.com/Gozala","followers_url":"https://api.github.com/users/Gozala/followers","following_url":"https://api.github.com/users/Gozala/following{/other_user}","gists_url":"https://api.github.com/users/Gozala/gists{/gist_id}","starred_url":"https://api.github.com/users/Gozala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gozala/subscriptions","organizations_url":"https://api.github.com/users/Gozala/orgs","repos_url":"https://api.github.com/users/Gozala/repos","events_url":"https://api.github.com/users/Gozala/events{/privacy}","received_events_url":"https://api.github.com/users/Gozala/received_events","type":"User","site_admin":false},"created_at":"2015-12-30T20:03:08Z","updated_at":"2015-12-30T20:03:08Z","body":"/cc @gabelevi "}}