payload: {"action":"opened","issue":{"url":"https://api.github.com/repos/DanielG/cabal-helper/issues/75","repository_url":"https://api.github.com/repos/DanielG/cabal-helper","labels_url":"https://api.github.com/repos/DanielG/cabal-helper/issues/75/labels{/name}","comments_url":"https://api.github.com/repos/DanielG/cabal-helper/issues/75/comments","events_url":"https://api.github.com/repos/DanielG/cabal-helper/issues/75/events","html_url":"https://github.com/DanielG/cabal-helper/issues/75","id":478885661,"node_id":"MDU6SXNzdWU0Nzg4ODU2NjE=","number":75,"title":"hsinspect requirements","user":{"login":"tseenshe","id":43448716,"node_id":"MDQ6VXNlcjQzNDQ4NzE2","avatar_url":"https://avatars2.githubusercontent.com/u/43448716?v=4","gravatar_id":"","url":"https://api.github.com/users/tseenshe","html_url":"https://github.com/tseenshe","followers_url":"https://api.github.com/users/tseenshe/followers","following_url":"https://api.github.com/users/tseenshe/following{/other_user}","gists_url":"https://api.github.com/users/tseenshe/gists{/gist_id}","starred_url":"https://api.github.com/users/tseenshe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tseenshe/subscriptions","organizations_url":"https://api.github.com/users/tseenshe/orgs","repos_url":"https://api.github.com/users/tseenshe/repos","events_url":"https://api.github.com/users/tseenshe/events{/privacy}","received_events_url":"https://api.github.com/users/tseenshe/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2019-08-09T09:16:55Z","updated_at":"2019-08-09T09:16:55Z","closed_at":null,"author_association":"NONE","body":"Hello!\r\n\r\nI would like to make use use `cabal-helper` to solve some problems that I am encountering when writing https://gitlab.com/tseenshe/hsinspect I hope you don't mind me creating a thread here for discussion (this is not a feature request or bug report as such).\r\n\r\n1. I would like to have a launcher that can choose which one of multiple binaries to launch based on the current ghc version. e.g. say the user (or more likely the text editor behind the scene, installs `hsinspect-ghc-8.4.4` and `hsinspect-ghc-8.6.5` and their current project is using `ghc-8.4.4` then I would like to invoke `hsinspect-ghc-8.4.4`. I can do this with a hack using `cabal v2-exec ghc` and parsing the output string but that is tedious and I am interested in alternatives. Note that actually installing applications this way is not easy because `--program-suffix` doesn't work during `v2-install` :man_shrugging: \r\n\r\n2. Inside my program I would like to be able to provide a `FilePath` (the source file I am inspecting) and receive back a `DynFlags` that is populated with anything relevant from the `.cabal` and `cabal.project` / `cabal.project.local`. Most importantly are: default language, language extensions, compiler options. i.e. `inferDynFlags :: FilePath -> IO [DynFlags]`.\r\n\r\n3. I would like to be able to generate a packagedb that matches the most recent `v2-build` (or implied build from a `v2-run` or `v2-install`) and set the correct environment variable, so that when I use the `ghc` api it is set appropriately. Ideally this would take the package and specific phase (application / library / test) into account, which would be far superior to the generated cabal `.ghc.env.*` files. i.e. `setupGhcEnv :: FilePath -> IO ()`.\r\n\r\n4. Without adding any more dependencies :smile: It is very important to me that I do not have a large depednency graph. I had hoped to be zero dependency (only `installed` things) to simplify and speed up the installation process (I was considering having my app be a single file that is compiled manually by directly invoking `ghc`!) So adding a dependency on `cabal-helper` is already a big step for me.\r\n\r\n5. `hie-bios` integration. Ideally I would like to be able to abstract these three features across all build tools. I understand that `hie-bios` plans to do that but I'd like to see it working reliably for `cabal-install` first. If `hie-bios` is going to have lots of big dependencies (e.g. on hpack or stack / yaml libraries) then that's a show stopper but perhaps I could put it behind a flag. // @mpickering \r\n"}}
other: {"actor":{"display_login":"tseenshe"}}