#883: Single command to figure out ghc[i] options needed to compile a single file ---------------------------------+------------------------------------------ Reporter: barsoap | Owner: Type: enhancement | Status: new Priority: normal | Milestone: Component: cabal-install tool | Version: 1.8.0.6 Severity: normal | Keywords: Difficulty: unknown | Ghcversion: Platform: | ---------------------------------+------------------------------------------ I'm thinking of a {{{cabal options <file.hs>}}} command that
1. locates the proper .cabal file for <file.hs> 2. parses that .cabal 3. outputs all options necessary to compile that file as cabal build would do it, that is, {{{-isrc -idist/build/autogen (-Xwhatever)* -hide-all- packages (-package-id whatever)*}}} There's already cabal-ghci on hackage which has one half of the equation, but packages are missing. (which happen to be available via grep and sed from cabal_macros.h...) Needing those options comes up when e.g. working with vim's haskellmode on a cabal project: Most if not all cabal projects' files just fail to compile with default options. Having such a command would give a bullet- proof, non-hackish and low-tech way to integrate cabal with any such IDE tool. (Do note that just building with cabal isn't enough, while haskellmode can parse the resulting warnings and errors, it doesn't stand a chance to figure out types, among other things, that way) -- Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/883> Hackage <http://haskell.org/cabal/> Hackage: Cabal and related projects _______________________________________________ cabal-devel mailing list cabal-devel@haskell.org http://www.haskell.org/mailman/listinfo/cabal-devel