[c2hs] #30: --include flag cannot handle windows paths

c2hs cvs-ghc at haskell.org
Mon May 3 13:48:19 EDT 2010

#30: --include flag cannot handle windows paths
 Reporter:  duncan   |       Owner:        
     Type:  defect   |      Status:  new   
 Priority:  normal   |   Milestone:        
Component:  general  |     Version:  0.16.2
 Keywords:           |  
 c2hs splits the string passed via the `--include` flag on the ':'
 character. On Unix, ':' is the search path separator character and the
 `--include` flag is intended to accept a whole search path in one go. On
 Windows, absolute paths look like `c:\blah` and these get broken if we
 split on ':' chars.

 Also it gobbles spaces. That breaks windows paths that often use spaces.

 Probably the solution is to use `System.FilePath.splitSearchPath` to split
 the search path. This uses ':' on Unix and ';' on Windows.

 Should also double check the order/priority of multiple independent
 --include flags vs --include=first:second.

Ticket URL: <http://hackage.haskell.org/trac/c2hs/ticket/30>
c2hs <http://www.cse.unsw.edu.au/~chak/haskell/c2hs/>
C->Haskell, An Interface Generator for Haskell

More information about the C2hs mailing list