[GHC] #9945: export list for System.Posix.Internals breaking the build on Windows
GHC
ghc-devs at haskell.org
Sat Jan 3 21:38:24 UTC 2015
#9945: export list for System.Posix.Internals breaking the build on Windows
-------------------------------------+-------------------------------------
Reporter: MartinF | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.11
Resolution: | Keywords:
Operating System: Windows | Architecture:
Type of failure: Building GHC | Unknown/Multiple
failed | Test Case:
Blocked By: | Blocking:
Related Tickets: #9852 | Differential Revisions:
-------------------------------------+-------------------------------------
Comment (by MartinF):
I've noticed something strange while looking into `peekFilePathLen` - this
is where it's defined:
{{{#!hs
#ifdef mingw32_HOST_OS
withFilePath :: FilePath -> (CWString -> IO a) -> IO a
withFilePath = withCWString
newFilePath :: FilePath -> IO CWString
newFilePath = newCWString
peekFilePath :: CWString -> IO FilePath
peekFilePath = peekCWString
#else
withFilePath :: FilePath -> (CString -> IO a) -> IO a
newFilePath :: FilePath -> IO CString
peekFilePath :: CString -> IO FilePath
peekFilePathLen :: CStringLen -> IO FilePath
withFilePath fp f = getFileSystemEncoding >>= \enc -> GHC.withCString enc
fp f
newFilePath fp = getFileSystemEncoding >>= \enc -> GHC.newCString enc fp
peekFilePath fp = getFileSystemEncoding >>= \enc -> GHC.peekCString enc fp
peekFilePathLen fp = getFileSystemEncoding >>= \enc -> GHC.peekCStringLen
enc fp
#endif
}}}
So, `#ifdef mingw32_HOST_OS`, those three related functions all have types
involving `CWString` - but if not, their types have `CString` instead.
If CPP-conditional exports are generally wrong, would the same be true for
exports with CPP-conditional types?
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9945#comment:12>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list