diff options
author | Ben Gamari <ben@smart-cactus.org> | 2020-10-23 14:16:58 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2020-11-29 18:26:15 -0500 |
commit | b3027eb0a1c1b3cedbb54b0fc8d0924283a7cd25 (patch) | |
tree | 428241e11a6a5d15592964d049344b85d8160cf4 /compiler/GHC/Parser/Header.hs | |
parent | f40b662b9ea555bab6e9729f4165eaca7021d322 (diff) | |
download | haskell-wip/stringbuffer.tar.gz |
StringBuffer: Rid it of ForeignPtrswip/stringbuffer
Bumps haddock submodule.
Diffstat (limited to 'compiler/GHC/Parser/Header.hs')
-rw-r--r-- | compiler/GHC/Parser/Header.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/GHC/Parser/Header.hs b/compiler/GHC/Parser/Header.hs index fdf854ad8e..8532cae63f 100644 --- a/compiler/GHC/Parser/Header.hs +++ b/compiler/GHC/Parser/Header.hs @@ -214,7 +214,7 @@ lazyGetToks popts filename handle = do -- counteracts the quadratic slowdown we otherwise get for very -- large module names (#5981) nextbuf <- hGetStringBufferBlock handle new_size - if (len nextbuf == 0) then lazyLexBuf handle state True new_size else do + if lengthStringBuffer nextbuf == 0 then lazyLexBuf handle state True new_size else do newbuf <- appendStringBuffers (buffer state) nextbuf unsafeInterleaveIO $ lazyLexBuf handle state{buffer=newbuf} False new_size |