{"action":"opened","issue":{"url":"https://api.github.com/repos/haskell/containers/issues/131","labels_url":"https://api.github.com/repos/haskell/containers/issues/131/labels{/name}","comments_url":"https://api.github.com/repos/haskell/containers/issues/131/comments","events_url":"https://api.github.com/repos/haskell/containers/issues/131/events","html_url":"https://github.com/haskell/containers/issues/131","id":54352473,"number":131,"title":"Make fancier MIN_VERSION_base fallback","user":{"login":"treeowl","id":1893117,"avatar_url":"https://avatars.githubusercontent.com/u/1893117?v=3","gravatar_id":"","url":"https://api.github.com/users/treeowl","html_url":"https://github.com/treeowl","followers_url":"https://api.github.com/users/treeowl/followers","following_url":"https://api.github.com/users/treeowl/following{/other_user}","gists_url":"https://api.github.com/users/treeowl/gists{/gist_id}","starred_url":"https://api.github.com/users/treeowl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/treeowl/subscriptions","organizations_url":"https://api.github.com/users/treeowl/orgs","repos_url":"https://api.github.com/users/treeowl/repos","events_url":"https://api.github.com/users/treeowl/events{/privacy}","received_events_url":"https://api.github.com/users/treeowl/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-01-14T17:42:11Z","updated_at":"2015-01-14T17:42:11Z","closed_at":null,"body":"We currently use the extremely pessimistic\r\n\r\n```haskell\r\n#define MIN_VERSION_base(major1,major2,minor) 0\r\n```\r\n\r\nNow that the definition is hidden away in an include file and not copied everywhere, we can make it much less so. The below is an optimistic version, but we could use a mildly pessimistic version instead to be really safe.\r\n```haskell\r\n#ifndef MIN_VERSION_base\r\n-- These are not precise, but allow the module to be built without cabal.\r\n#if __GLASGOW_HASKELL__ >= 709\r\n#define MIN_VERSION_base(major1,major2,minor) (((major1) <= 4) && ((major2) <= 8))\r\n#elif __GLASGOW_HASKELL__ >= 707\r\n#define MIN_VERSION_base(major1,major2,minor) (((major1) <= 4) && ((major2) <= 7))\r\n#elif __GLASGOW_HASKELL__ >= 706\r\n#define MIN_VERSION_base(major1,major2,minor) (((major1) <= 4) && ((major2) <= 6))\r\n#else\r\n#define MIN_VERSION_base(major1,major2,minor) (0)\r\n#endif\r\n#endif\r\n```"}}