Closed mengwong closed 2 years ago
emptyBuffer
initializes bufOffset
to 0. I hope that's okay – I don't really know what the code is doing so this patch is purely syntactic.
Thank you @mengwong! The build fails on ghc 7.10.3, and the later checks are skipped, so it's unclear whether they work. Did you check this with some of the ghc 8.* versions?
Seems like the failing is due to something else. The build has failed since e4b2f28, and this patch succeeds on my computer with stack install
for several ghc versions, and test suit passes. So I suggest we merge this, unless there are objections from @johnjcamilleri or @krangelov?
So this pull request is effectively breaking support for GHC < 8? Is there no way to put this behind a compiler version pragma, as is done elsewhere in the code?
@johnjcamilleri No it doesn't seem to be actually breaking, it works on my computer for GHC < 8. The breaking happened in a previous commit (e4b2f28), which suggests that something has changed on the build server. All of these breaking commits have worked on my computer.
Now that #138 fixed the issue on build server, we can see that this works on all ghc versions we test for.
base 4.15 added a bufOffset field to the Buffer record.
Without this patch, we can expect this error when compiling with GHC 9