On 15 Aug 2015, at 16:03, David Banas <capn.freako@gmail.com> wrote:
Hi all,
Does anyone know why I’m getting redundant entries in my ‘cabal init’ generated .cabal file:
library exposed-modules: Language.Broker, Language.Broker
?
Is it because I’m using a *.hsc file, as my source, and cabal is finding both files: • Broker.hsc, and • Broker.hs in the Language directory?
Yes. You can (and probably should) remove the `Broker.hs`; if you put: build-tools: hsc2hs (plus version constraint) in your cabal file, then Cabal knows how to generate the Haskell file itself. Which programs are allowed in `build-tools` doesn't seem to be documented as far as I can tell, but it is some or all of the things listed here: https://github.com/haskell/cabal/blob/master/Cabal/Distribution/Simple/Progr... In any case, it certainly includes hsc2hs, and also alex, happy, cpphs, c2hs, and greencard (but not uuagc :( ). And, btw, you can put support for custom preprocessors in your `Setup.hs`, should you need that in future.
Thanks, -db