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

mhs fails to compile cpphs when preprocessed by cpphs-hugs #137

Open
AlexandreTunstall opened this issue Feb 19, 2025 · 2 comments
Open

Comments

@AlexandreTunstall
Copy link

Setting USECPPHS to cpphs-hugs causes the cpphs build to fail with the following error.

mhs: error: "cpphssrc/malcolm-wallace-universe/polyparse-1.12/src/Text/ParserCombinators/Poly/Parser.hs": line 50, col 5: superflous instance binding

In contrast, bootstrapcpphs succeeds when using bin/cpphs built from the pre-existing generated/cpphs.c.

The cpphs-hugs binary comes from the patched Hugs recommended in the README.

Unfortunately, this prevents bootstrapping without pre-generated sources, since the bootstrapcpphs target needs to run cpphs.

@AlexandreTunstall
Copy link
Author

With some non-trivial patching, I've managed to get the MicroHs version of cpphs to work under runhugs. When using that version, mhs is able to build cpphs without relying on generated/cpphs.c.

The patches I've written are not yet public, but I plan on publishing them within a week. Ping me if I've forgotten to link them here.

@augustss
Copy link
Owner

The complaint you got is because MIN_VERSION_base is not defined to some sensible value.

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

No branches or pull requests

2 participants