ghc-pkg and quoting on haddock-related fields

Esa Ilari Vuokko eivuokko at gmail.com
Wed Aug 8 19:26:55 EDT 2007


Hi,

I think some recent change might have brought following
problem up.  installed-pkg-config has some fields escaped
when they have spaces (or commas as Thomas showed me in
irc.)  The token is quoted using Prelude.Show.  In case of
haddock-interfaces, Cabal actually asks this information
back when using haddock to generate docs.  ghc-pkg doesn't
touch the fields in any way.  However, System.Process
(or Cabal's own layer) adds quoting for parameters as well,
which leads to haddock calling openBinaryFile with a
FilePath that contains quotes - and dies horribly.

This happens as a rule in Windows when generating docs
for package that depends on package that has it's docs
installed to a path with spaces on it.  Normally ghc
is installed to a path with no spaces on it, and these
problems don't come up before installing few extra
packages with Cabal.

Is the right fix to make Cabal unquote the fields it
receives from ghc-pkg, or is there some more complex
problem lurking around?

Best regards,
Esa


More information about the cabal-devel mailing list