summaryrefslogtreecommitdiff
path: root/src/compiler
diff options
context:
space:
mode:
authorMeng Weng Wong <mengwong@gmail.com>2022-02-20 22:13:26 +0800
committerInari Listenmaa <inari.listenmaa@gmail.com>2022-03-05 12:59:25 +0800
commit3a1213ab378bbcbf09b631e4066b3056ec699528 (patch)
tree60d4c8a2771dcded7f4ae51a2530c076f8e6ec12 /src/compiler
parent1b41e94f83feb5bba7a12780128f305573477b84 (diff)
prepare for GHC 9, base 4.15, by using Buffer constructor interface
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/GF/Text/Coding.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/GF/Text/Coding.hs b/src/compiler/GF/Text/Coding.hs
index bac7938c0..2a89427fe 100644
--- a/src/compiler/GF/Text/Coding.hs
+++ b/src/compiler/GF/Text/Coding.hs
@@ -38,7 +38,7 @@ decodeUnicode :: TextEncoding -> ByteString -> String
decodeUnicode enc bs = unsafePerformIO $ decodeUnicodeIO enc bs
decodeUnicodeIO enc (PS fptr l len) = do
- let bbuf = Buffer{bufRaw=fptr, bufState=ReadBuffer, bufSize=len, bufL=l, bufR=l+len}
+ let bbuf = (emptyBuffer fptr len ReadBuffer) { bufL=l, bufR=l+len }
cbuf <- newCharBuffer 128 WriteBuffer
case enc of
TextEncoding {mkTextDecoder=mk} -> do decoder <- mk