Matthew Pickering pushed to branch wip/romes/ast-ohne-faststring at Glasgow Haskell Compiler / GHC
Commits:
-
df7aca9b
by Matthew Pickering at 2026-02-13T12:09:04+00:00
4 changed files:
- compiler/GHC/Data/FastString.hs
- + testsuite/tests/parser/should_run/StringStartsWithNull.hs
- + testsuite/tests/parser/should_run/StringStartsWithNull.stdout
- testsuite/tests/parser/should_run/all.T
Changes:
| ... | ... | @@ -558,7 +558,7 @@ mkFastStringShortByteString sbs = |
| 558 | 558 | |
| 559 | 559 | -- | Create a UTF-8 encoded 'FastString' from a 'Text'
|
| 560 | 560 | mkFastStringText :: T.Text -> FastString
|
| 561 | -mkFastStringText = mkFastStringByteString . T.encodeUtf8
|
|
| 561 | +mkFastStringText = mkFastString . T.unpack
|
|
| 562 | 562 | |
| 563 | 563 | -- | Creates a UTF-8 encoded 'FastString' from a 'String'
|
| 564 | 564 | mkFastString :: String -> FastString
|
| 1 | +module Main where
|
|
| 2 | + |
|
| 3 | +main :: IO ()
|
|
| 4 | +main = print "\0a" |
| 1 | +"\NULa" |
| ... | ... | @@ -20,6 +20,7 @@ test('HexFloatLiterals', normal, compile_and_run, ['']) |
| 20 | 20 | test('NumericUnderscores0', normal, compile_and_run, [''])
|
| 21 | 21 | test('NumericUnderscores1', normal, compile_and_run, [''])
|
| 22 | 22 | test('LexNegLit', normal, compile_and_run, [''])
|
| 23 | +test('StringStartsWithNull', normal, compile_and_run, [''])
|
|
| 23 | 24 | test('RecordDotSyntax1', normal, compile_and_run, [''])
|
| 24 | 25 | test('RecordDotSyntax2', normal, compile_and_run, [''])
|
| 25 | 26 | test('RecordDotSyntax3', [extra_files(['RecordDotSyntaxA.hs'])], multimod_compile_and_run, ['RecordDotSyntax3', ''])
|