Skip to content

quasi-quotes have carriage returns on Windows

A Windows user rerported using Data.Text.IO.writeFile to write out quasi-quoted text.

writeFile automatically translates '\r' to "\r\n", so the user ended up writing out "\r\r\n" to a file.

Haskell seems to be adopting the policy or removing '\r' from Haskell land. Is there any reason why quasi-quotes should not automatically strip carriage returns?

I asked this question on ghc-users and there was no response.

I am willing to make this fix if it is deemed appropriate.

Trac metadata
Trac field Value
Version 7.6.3
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Template Haskell
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system Unknown/Multiple
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information