
#14876: Reading source files in text mode so that we get CRLF conversion under Windows? -------------------------------------+------------------------------------- Reporter: SimonHengel | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by bgamari): GHC uses its `StringBuffer` abstraction, which is essentially just a bytestring, to read source files. `hGetStringBuffer` opens the file in binary mode, leaving UTF-8 decoding to `nextChar` and friends. In principle we could probably do newline conversion there. That being said, I'm a bit weary of changing this in fear of breaking someone relying on the current behavior. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14876#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler