
#11215: Line endings in quasiquotations are not normalised -------------------------------------+------------------------------------- Reporter: refold | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.3 (Parser) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Incorrect result | Unknown/Multiple at runtime | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by goldfire): I'm not convinced the normalizing is something GHC should do. The quasi- quoter could easily do this. Maybe a quasi-quoter wants, for some inscrutable reason, to tell the difference between LF and CRLF. (Perhaps to warn a user about a bad newline encoding. But I admit this possibility is a stretch.) If GHC normalizes, then quasi-quoters have lost this ability. On the other hand, it's dead easy for a quasi-quoter to do this itself. If you feel strongly, I could see the benefit of having a `normaliseLineEndings :: String -> String` available in `Language.Haskell.TH.Quote` but even that seems a little special-cased. And I'm certainly in favor of making this louder in the documentation. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11215#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler