diff options
author | alexbiehl <alex.biehl@gmail.com> | 2017-08-21 20:05:42 +0200 |
---|---|---|
committer | alexbiehl <alex.biehl@gmail.com> | 2017-08-21 20:05:42 +0200 |
commit | 7a71af839bd71992a36d97650004c73bf11fa436 (patch) | |
tree | e64afbc9df5c97fde6ac6433e42f28df8a4acf49 /haddock-test/src/Test/Haddock/Utils.hs | |
parent | c8a01b83be52e45d3890db173ffe7b09ccd4f351 (diff) | |
parent | 740458ac4d2acf197f2ef8dc94a66f9b160b9c3c (diff) |
Merge remote-tracking branch 'origin/master' into ghc-head
Diffstat (limited to 'haddock-test/src/Test/Haddock/Utils.hs')
-rw-r--r-- | haddock-test/src/Test/Haddock/Utils.hs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/haddock-test/src/Test/Haddock/Utils.hs b/haddock-test/src/Test/Haddock/Utils.hs index a947fea1..58408aaf 100644 --- a/haddock-test/src/Test/Haddock/Utils.hs +++ b/haddock-test/src/Test/Haddock/Utils.hs @@ -48,3 +48,10 @@ copyFile' :: FilePath -> FilePath -> IO () copyFile' old new = do createDirectoryIfMissing True $ takeDirectory new copyFile old new + + +crlfToLf :: String -> String +crlfToLf "" = "" +crlfToLf ('\r' : '\n' : rest) = '\n' : crlfToLf rest +crlfToLf ('\r' : rest) = '\n' : crlfToLf rest +crlfToLf (other : rest) = other : crlfToLf rest |