Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data.ByteString: Implement breakSubstring, packCString, packCStringLen #147

Merged
merged 5 commits into from
Feb 26, 2025

Conversation

konsumlamm
Copy link
Contributor

Change the peekCAString/peekCAStringLen primitives to packCString/packCStringLen, which return a bytestring and change peekCAString and peekCAStringLen to use those new primitives.

@konsumlamm
Copy link
Contributor Author

I think the reason the Hackage CI fails is because its mcabal was compiled with an older mhs version, so it expects peekCAString to be there.

@augustss
Copy link
Owner

When there are changes to the primitives the idea is to update the binary version number. I almost always forget to do it myself. 🙂

@augustss
Copy link
Owner

Do 'make preparedist' to rebuild the mcabal and cpphs .c files.

@konsumlamm
Copy link
Contributor Author

When there are changes to the primitives the idea is to update the binary version number. I almost always forget to do it myself. 🙂

You mean the mhs version? As far as I can tell, that is done through updating the version in MicroHs.cabal and then running sh updateversion.sh? Should this be a patch, minor, or major update? What about the combinator file version?

@augustss
Copy link
Owner

No, I'm referring to combVersion in ExpPrint.hs and VERSION in eval.c.

@konsumlamm
Copy link
Contributor Author

konsumlamm commented Feb 25, 2025

I'm getting stuck at bootstrapcpphs, which requires bin/cpphs, but make bin/cpphs doesn't work, because it uses an old combinator file version.

EDIT: Running make bin/cpphs before updating the combinator file version seems to work.

@augustss
Copy link
Owner

Also you can do make USECPPHS=cpphs bootstratcpphs, assuming you have cpphs installed.

@konsumlamm
Copy link
Contributor Author

I regenerated everything, is there anything left to do?

@augustss augustss merged commit dc696f3 into augustss:master Feb 26, 2025
13 checks passed
@konsumlamm konsumlamm deleted the cstring branch February 26, 2025 08:22
@augustss
Copy link
Owner

Thanks for your ByteString changes. It was exactly what I needed for adding Unicode support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants