Repository navigation
Simplify rewrite rules for enumFromTo - #557
Conversation
GitHub actions provide an i386 container, see for example https://github.com/Bodigrim/bitvec/blob/95cdcf0c046b94af284ab4e7903da4d435fbf5c5/.github/workflows/ci.yaml#L49-L67. It's also possible to emulate various architectures (see below that), but that is significantly slower. You could also consider testing the JS and WASM backends (see for example https://github.com/Bodigrim/bitvec/blob/95cdcf0c046b94af284ab4e7903da4d435fbf5c5/.github/workflows/ci.yaml#L96-L159). |
3f76893 to
763368e
Compare
|
And surely enough I did break build on 32 bit platform. GHC9.0 & 9.2 fail on CI again with identical symptoms. I reset cache again. It helped but it can break again. I'm not sure what to do about it in that case I need to recheck |
Note that #ifdef condition was wrong! We had 2 rules on 64 bits and none at 32 bit. Lesson: #ifdef spaghetti is bad. It's better to keep conditions few and local.
Setup is copied from bitvec Also reset CI cache again. GHC 9.0 is failing again with same symptoms
763368e to
ba76084
Compare
|
I think this PR is as good as it going to be. It does simplify code and does fix rewrites on 32-bit systems. Maybe it's possible to make better. Maybe |
e15d91b to
19b1a2b
Compare
Previous setup used Ubuntu bionic (18.04) which is too old and ghcup started failing to install GHC (libc is too old) Instead copy setup from os-string. It will hopefully work
1408f2f to
0eb3116
Compare
This is a simplification of rewrite rules: use type application for compactness and group them all together.
Also I found that one of them is wrong. Rule clearly intended for 32-bit builds was enabled for 64-bit instead.
vector/vector/src/Data/Vector/Fusion/Bundle/Monadic.hs
Lines 949 to 980 in 8c0039f
Compare
vector/vector/src/Data/Vector/Fusion/Bundle/Monadic.hs
Lines 894 to 899 in 8c0039f
That made me think. We notionally support 32-bit platforms, we have CPP for them, but we don't even test buildability on CI. Does anyone has ideas how to add such tests?