
#12504: Windows: Using hsc2hs in combination with inline-c generates the .c files with invalid paths ----------------------------+---------------------------------------- Reporter: rcook | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: hsc2hs | Version: 8.0.1 Resolution: | Keywords: Operating System: Windows | Architecture: Unknown/Multiple Type of failure: Other | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | ----------------------------+---------------------------------------- Comment (by rcook): See comment from "awson" at: https://github.com/fpco/inline-c/issues/50#issuecomment-241212544: The culprit is `{-# LINE ... #-}` pragmas in the files generated by hsc2hs. hsc2hs on Windows emits paths with non-escaped backslashes in it: {{{#!hs {-# LINE 1 "src\Language\C\Clang\Internal\FFI.hsc" #-} }}} I don't know how GHC's `LINE` pragma behavior is specified, but this is at least inconsistent with how Windows C compilers operate. GCC emits line directives with forward slashes in paths and Visual C emits escaped backslashes. Thus I mostly inclined to treat this as a bug in hsc2hs (easily fixable). -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12504#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler