{"action":"created","issue":{"url":"https://api.github.com/repos/Gabriel439/Haskell-Optparse-Generic-Library/issues/11","repository_url":"https://api.github.com/repos/Gabriel439/Haskell-Optparse-Generic-Library","labels_url":"https://api.github.com/repos/Gabriel439/Haskell-Optparse-Generic-Library/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/Gabriel439/Haskell-Optparse-Generic-Library/issues/11/comments","events_url":"https://api.github.com/repos/Gabriel439/Haskell-Optparse-Generic-Library/issues/11/events","html_url":"https://github.com/Gabriel439/Haskell-Optparse-Generic-Library/issues/11","id":139446150,"number":11,"title":"Defaults for optional parameters","user":{"login":"deepfire","id":452652,"avatar_url":"https://avatars.githubusercontent.com/u/452652?v=3","gravatar_id":"","url":"https://api.github.com/users/deepfire","html_url":"https://github.com/deepfire","followers_url":"https://api.github.com/users/deepfire/followers","following_url":"https://api.github.com/users/deepfire/following{/other_user}","gists_url":"https://api.github.com/users/deepfire/gists{/gist_id}","starred_url":"https://api.github.com/users/deepfire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deepfire/subscriptions","organizations_url":"https://api.github.com/users/deepfire/orgs","repos_url":"https://api.github.com/users/deepfire/repos","events_url":"https://api.github.com/users/deepfire/events{/privacy}","received_events_url":"https://api.github.com/users/deepfire/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2016-03-09T01:31:36Z","updated_at":"2016-03-20T00:47:00Z","closed_at":null,"body":"What is the story for defaulting of optionals?\r\n\r\nMaybe some constructors like `First` can be employed for that?"},"comment":{"url":"https://api.github.com/repos/Gabriel439/Haskell-Optparse-Generic-Library/issues/comments/198816335","html_url":"https://github.com/Gabriel439/Haskell-Optparse-Generic-Library/issues/11#issuecomment-198816335","issue_url":"https://api.github.com/repos/Gabriel439/Haskell-Optparse-Generic-Library/issues/11","id":198816335,"user":{"login":"PierreR","id":93115,"avatar_url":"https://avatars.githubusercontent.com/u/93115?v=3","gravatar_id":"","url":"https://api.github.com/users/PierreR","html_url":"https://github.com/PierreR","followers_url":"https://api.github.com/users/PierreR/followers","following_url":"https://api.github.com/users/PierreR/following{/other_user}","gists_url":"https://api.github.com/users/PierreR/gists{/gist_id}","starred_url":"https://api.github.com/users/PierreR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PierreR/subscriptions","organizations_url":"https://api.github.com/users/PierreR/orgs","repos_url":"https://api.github.com/users/PierreR/repos","events_url":"https://api.github.com/users/PierreR/events{/privacy}","received_events_url":"https://api.github.com/users/PierreR/received_events","type":"User","site_admin":false},"created_at":"2016-03-20T00:47:00Z","updated_at":"2016-03-20T00:47:00Z","body":"What I would find very convenient is the ability to specify defaults using an external file (ala `configurator`). I actually need something a bit more complex as I have to read defaults from different file according to user input. I currently handle this with a `make` file but it seems a bit overkilled. So for instance `make foo ZONE=test` would read default configuration from a file called \".env-test\" ...\r\n\r\nI don't see how to do this in an \"extra\" library on top of `optparse-generic` and `configurator` because ideally the parser should check that every field is present (even if only some of them are provided by the command line and the others from the file)."}}