summaryrefslogtreecommitdiff
path: root/compiler/GHC/Parser/Lexer.x
diff options
context:
space:
mode:
authorZubin Duggal <zubin.duggal@gmail.com>2023-05-16 14:34:19 +0530
committerZubin Duggal <zubin.duggal@gmail.com>2023-05-17 12:21:31 +0530
commit17fcce4ca5bf1418d8f335e869d328e1913d3f95 (patch)
tree18f5adee7cbcc938d4a1dd9b359659ca161c4661 /compiler/GHC/Parser/Lexer.x
parent2972fd66f91cb51426a1df86b8166a067015e231 (diff)
downloadhaskell-wip/no-binary-char.tar.gz
compiler: Remove instance Binary Charwip/no-binary-char
It is generally not a good idea to serialise strings as [Char] into interface files, as upon deserialisation each of these would be turned into a highly memory inefficient structure mostly composed of cons cells and pointers. If you really want to serialise a Char, use the SerialisableChar newtype.
Diffstat (limited to 'compiler/GHC/Parser/Lexer.x')
-rw-r--r--compiler/GHC/Parser/Lexer.x2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/GHC/Parser/Lexer.x b/compiler/GHC/Parser/Lexer.x
index 61235f5942..496fcd681b 100644
--- a/compiler/GHC/Parser/Lexer.x
+++ b/compiler/GHC/Parser/Lexer.x
@@ -1614,7 +1614,7 @@ mkHdkCommentPrev loc mkDS = (HdkCommentPrev ds,ITdocComment ds loc)
mkHdkCommentNamed :: PsSpan -> String -> (HsDocStringDecorator -> HsDocString) -> (HdkComment, Token)
mkHdkCommentNamed loc name mkDS = (HdkCommentNamed name ds, ITdocComment ds loc)
- where ds = mkDS (HsDocStringNamed name)
+ where ds = mkDS (HsDocStringNamed $ LexicalFastString $ mkFastString name)
mkHdkCommentSection :: PsSpan -> Int -> (HsDocStringDecorator -> HsDocString) -> (HdkComment, Token)
mkHdkCommentSection loc n mkDS = (HdkCommentSection n ds, ITdocComment ds loc)