{"action":"opened","issue":{"url":"https://api.github.com/repos/ndmitchell/cmdargs/issues/35","labels_url":"https://api.github.com/repos/ndmitchell/cmdargs/issues/35/labels{/name}","comments_url":"https://api.github.com/repos/ndmitchell/cmdargs/issues/35/comments","events_url":"https://api.github.com/repos/ndmitchell/cmdargs/issues/35/events","html_url":"https://github.com/ndmitchell/cmdargs/issues/35","id":101426076,"number":35,"title":"Support nested records","user":{"login":"ndmitchell","id":1651197,"avatar_url":"https://avatars.githubusercontent.com/u/1651197?v=3","gravatar_id":"","url":"https://api.github.com/users/ndmitchell","html_url":"https://github.com/ndmitchell","followers_url":"https://api.github.com/users/ndmitchell/followers","following_url":"https://api.github.com/users/ndmitchell/following{/other_user}","gists_url":"https://api.github.com/users/ndmitchell/gists{/gist_id}","starred_url":"https://api.github.com/users/ndmitchell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ndmitchell/subscriptions","organizations_url":"https://api.github.com/users/ndmitchell/orgs","repos_url":"https://api.github.com/users/ndmitchell/repos","events_url":"https://api.github.com/users/ndmitchell/events{/privacy}","received_events_url":"https://api.github.com/users/ndmitchell/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-17T13:57:06Z","updated_at":"2015-08-17T13:57:06Z","closed_at":null,"body":"From http://code.google.com/p/ndmitchell/issues/detail?id=291:\r\n\r\n@aavogt says: cmdargs should support nested records:\r\n\r\n    > data A = A { optA :: X, optB :: Y }\r\n    > data Y = Y { xopt :: X, optionY :: Bool }\r\n    > data X = X { path :: String, optionX :: Bool }\r\n\r\nIt should be possible to use:\r\n\r\n    > mode (A (X \"here\" True) (Y (X \"there\" False) True)\r\n\r\nWhich would infer flags including:\r\n\r\n     --opta-optionx, --optb-xopt-path\r\n\r\nIt would be nice not to have to expand the redundancy in the arguments in\r\nthe usage description, but I'm not sure when or how that should be done.\r\n\r\n@ndmitchell replied:It's possible it should just infer --optionx and --path, so the nesting is for the \r\nauthor of CmdArgs, not the user. Anyway, something should be done."}}