{"action":"created","issue":{"url":"https://api.github.com/repos/commercialhaskell/stack/issues/827","repository_url":"https://api.github.com/repos/commercialhaskell/stack","labels_url":"https://api.github.com/repos/commercialhaskell/stack/issues/827/labels{/name}","comments_url":"https://api.github.com/repos/commercialhaskell/stack/issues/827/comments","events_url":"https://api.github.com/repos/commercialhaskell/stack/issues/827/events","html_url":"https://github.com/commercialhaskell/stack/issues/827","id":102278861,"number":827,"title":"Command-line --ghc-options don't seem to pass through","user":{"login":"afcowie","id":1088511,"avatar_url":"https://avatars.githubusercontent.com/u/1088511?v=3","gravatar_id":"","url":"https://api.github.com/users/afcowie","html_url":"https://github.com/afcowie","followers_url":"https://api.github.com/users/afcowie/followers","following_url":"https://api.github.com/users/afcowie/following{/other_user}","gists_url":"https://api.github.com/users/afcowie/gists{/gist_id}","starred_url":"https://api.github.com/users/afcowie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/afcowie/subscriptions","organizations_url":"https://api.github.com/users/afcowie/orgs","repos_url":"https://api.github.com/users/afcowie/repos","events_url":"https://api.github.com/users/afcowie/events{/privacy}","received_events_url":"https://api.github.com/users/afcowie/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/commercialhaskell/stack/labels/awaiting%20pr","name":"awaiting pr","color":"fef2c0"},{"url":"https://api.github.com/repos/commercialhaskell/stack/labels/component:%20documentation","name":"component: documentation","color":"bfdadc"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/commercialhaskell/stack/milestones/6","html_url":"https://github.com/commercialhaskell/stack/milestones/P2:%20Should","labels_url":"https://api.github.com/repos/commercialhaskell/stack/milestones/6/labels","id":1191309,"number":6,"title":"P2: Should","description":"Arbitrary date chosen, just to get the milestones to order nicely","creator":{"login":"snoyberg","id":49415,"avatar_url":"https://avatars.githubusercontent.com/u/49415?v=3","gravatar_id":"","url":"https://api.github.com/users/snoyberg","html_url":"https://github.com/snoyberg","followers_url":"https://api.github.com/users/snoyberg/followers","following_url":"https://api.github.com/users/snoyberg/following{/other_user}","gists_url":"https://api.github.com/users/snoyberg/gists{/gist_id}","starred_url":"https://api.github.com/users/snoyberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snoyberg/subscriptions","organizations_url":"https://api.github.com/users/snoyberg/orgs","repos_url":"https://api.github.com/users/snoyberg/repos","events_url":"https://api.github.com/users/snoyberg/events{/privacy}","received_events_url":"https://api.github.com/users/snoyberg/received_events","type":"User","site_admin":false},"open_issues":158,"closed_issues":217,"state":"open","created_at":"2015-07-02T18:20:49Z","updated_at":"2016-07-21T10:39:07Z","due_on":"2016-12-31T08:00:00Z","closed_at":null},"comments":13,"created_at":"2015-08-21T02:11:51Z","updated_at":"2016-07-22T09:36:09Z","closed_at":null,"body":"The instructions to build **leksah** say to do:\r\n\r\n```\r\ncabal build regex-tdfa-text --ghc-options=-XFlexibleContexts\r\n```\r\nSo I tried same with **stack**:\r\n```\r\nstack build regex-tdfa-text --ghc-options=-XFlexibleContexts     # and, just in case\r\nstack build --ghc-options=-XFlexibleContexts regex-tdfa-text\r\n```\r\nAnd it didn't pick up FlexibleContexts, build fails. https://github.com/commercialhaskell/stack/issues/758 gave me the impression this technique should work?\r\n\r\nI then discovered you can add `ghc-options` sections to a _stack.yaml_, like so:\r\n```\r\nghc-options:\r\n  regex-tdfa-text: -XFlexibleContexts\r\n```\r\n\r\n(and then realized the one added to the leksah repo turns out to have had that, but I wasn't then using 'master', was trying to build release) and it built.\r\n\r\nShouldn't `--ghc-options=-XBlah` have passed `-XBlah` through to enable the Blah language extension? The stack documentation talks about this being preferable to doing it in _stack.yaml_ so snapshot version isn't impacted (not that anyone else is using this package, but anyway).\r\n\r\n[I gather the issue on point is https://github.com/leksah/leksah/issues/156 but I wanted to report my attempted workaround and my impression that it should have worked]\r\n\r\nAfC\r\n"},"comment":{"url":"https://api.github.com/repos/commercialhaskell/stack/issues/comments/234499895","html_url":"https://github.com/commercialhaskell/stack/issues/827#issuecomment-234499895","issue_url":"https://api.github.com/repos/commercialhaskell/stack/issues/827","id":234499895,"user":{"login":"sjakobi","id":3664523,"avatar_url":"https://avatars.githubusercontent.com/u/3664523?v=3","gravatar_id":"","url":"https://api.github.com/users/sjakobi","html_url":"https://github.com/sjakobi","followers_url":"https://api.github.com/users/sjakobi/followers","following_url":"https://api.github.com/users/sjakobi/following{/other_user}","gists_url":"https://api.github.com/users/sjakobi/gists{/gist_id}","starred_url":"https://api.github.com/users/sjakobi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sjakobi/subscriptions","organizations_url":"https://api.github.com/users/sjakobi/orgs","repos_url":"https://api.github.com/users/sjakobi/repos","events_url":"https://api.github.com/users/sjakobi/events{/privacy}","received_events_url":"https://api.github.com/users/sjakobi/received_events","type":"User","site_admin":false},"created_at":"2016-07-22T09:36:09Z","updated_at":"2016-07-22T09:36:09Z","body":"I'm trying to fix this issue in https://github.com/commercialhaskell/stack/pull/2402.\r\n\r\nYou may want to check if what I wrote is actually correct. ;)"}}
{"actor":{"display_login":"sjakobi"}}