[GHC] #11215: Line endings in quasiquotations are not normalised

GHC ghc-devs at haskell.org
Mon Dec 14 17:11:24 UTC 2015


#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 refold):

 I'll summarise/reiterate my arguments for doing this in GHC:

 * Other languages do this. For example, multiline raw string literals in
 Python will have LF line endings regardless of the source file encoding.
 Same in C++.
 * Requiring the users to do it themselves is error-prone. Basically
 everyone who implements a quasiquoter now has to remember about this
 quirk.
 * The feature hurts portability but benefits no one, because line endings
 can change depending on which platform the program is compiled.
 * This behaviour already caused a [https://github.com/23Skidoo/raw-
 strings-qq/issues/1 bug in real code], but there're no examples of code
 actually depending on it.
 * The problem is exacerbated by the automatic newline conversion in
 version control systems.
 * If you really want to preserve this behaviour, it should be opt-in
 instead of opt-out. Adding `normaliseLineEndings` to the standard library
 is not a solution.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11215#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list