[GHC] #12504: Windows: Using hsc2hs in combination with inline-c generates the .c files with invalid paths
GHC
ghc-devs at haskell.org
Sat Aug 20 17:47:14 UTC 2016
#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
More information about the ghc-tickets
mailing list