#2389: ghc-pkg can't use path with spaces.
-------------------------+--------------------------------------------------
Reporter: shelarcy | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 6.8.3
Severity: normal | Resolution:
Keywords: | Testcase:
Architecture: Multiple | Os: Windows
-------------------------+--------------------------------------------------
Comment (by duncan):
The syntax to use when the file names contain spaces is Haskell `String`
syntax:
{{{
import-dirs:"C:\\Documents and
Settings\\shelarcy\\デスクトップ\\wxhaskell-0.10.3\\lib\\imports"
library-dirs:"C:\\Documents and
Settings\\shelarcy\\デスクトップ\\wxhaskell-0.10.3\\lib"
}}}
The `\` chars have to be escaped because that's what the lexical syntax of
Haskell requires. This is exactly what Cabal does when it generates the
input for `ghc-pkg`.
Of course this also raises the question of what encoding package files are
in. Currently `ghc-pkg` uses `readFile` to read the package index which
means it's expecting latin-1 encoding.
Cabal uses UTF-8 for .cabal files and I suggest that `ghc-pkg` do the
same.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2389#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs