[Hackage] #712: File names can contain spaces

#712: File names can contain spaces ----------------------------+----------------------------------------------- Reporter: guest | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: Cabal library | Version: HEAD Severity: normal | Keywords: Difficulty: unknown | Ghcversion: Platform: | ----------------------------+----------------------------------------------- Some operating systems support file names containing spaces. However, Cabal's package description parser breaks fields such as extra-lib-dirs on spaces, regardless of the presence or absence of quotation marks and the like. For instance, using the source tarball available from http://hackage.haskell.org/package/Cabal, we have: *Distribution.PackageDescription.Parse Distribution.Compat.ReadP> readP_to_S parseFilePathQ "\"C:\\Path With Spaces\\\"" [("\"C:\\Path"," With Spaces\\\"")] -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/712 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#712: File names can contain spaces ----------------------------+----------------------------------------------- Reporter: guest | Owner: Type: defect | Status: closed Priority: normal | Milestone: Component: Cabal library | Version: HEAD Severity: normal | Resolution: invalid Keywords: | Difficulty: unknown Ghcversion: | Platform: ----------------------------+----------------------------------------------- Changes (by duncan): * status: new => closed * resolution: => invalid Comment: As far as I know this is correct. The example cited is a misunderstanding. The correct test is: {{{ readP_to_S parseFilePathQ "\"C:\\\\Path With Spaces\\\\\"" }}} because that corresponds to the Haskell String "C:\\Path With Spaces\\" which is the representation of {{{ C:\Path With Spaces\ }}} If one uses the following in a .cabal file then it works as expected {{{ extra-lib-dirs: "C:\\Path With Spaces\\" }}} I am assuming therefore that this ticket is just a misunderstanding. If there is a genuine bug then please reopen with further details. If the bug is in the user guide then lets improve that, suggestions welcome. Or perhaps we should make it an error for a token to start with " but then to have incorrect Haskell String lexical syntax. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/712#comment:1 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects
participants (1)
-
Hackage