Skip to content

No bootstrapping #169

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

Closed
int-index opened this issue Aug 15, 2020 · 2 comments · Fixed by #175
Closed

No bootstrapping #169

int-index opened this issue Aug 15, 2020 · 2 comments · Fixed by #175

Comments

@int-index
Copy link
Collaborator

int-index commented Aug 15, 2020

Currently, building happy requires a pre-built binary of happy.

It is, surely, elegant, in the same way a self-hosting compiler is elegant. But it also makes building purely from source more complicated than needed.

What we could do instead is parse .y and .ly files using parser combinators. But it would also be nice to avoid a dependency on another parsing library. Also, the currently existing hand-rolled lexers are written in continuation-passing style, so we'd need a library compatible with that.

So I developed a small, bespoke parsing library, specifically for happy, and it seems to work nicely. Patch here: #170

@andreasabel
Copy link
Member

2021-02-15: It seems that happy still has some bootstrapping issues.
At least, it does not work out-of-the-box.

I tried to build standard CI for happy using the https://github.com/Haskell-CI/haskell-ci tool, but it fails due to requiring happy already: https://github.com/andreasabel/happy/runs/1909119222

Couldn't happy be made independent of its own by

check[ing] in Happy-generated files

#170 (comment)

Anyhow, you already had a long discussion about this at #175.
It would be great if building happy would work out-of-the box with standard cabal commands (without requiring happy).

@Ericson2314
Copy link
Collaborator

@andreasabel I think this is because the flag is manual and on by default: https://github.com/simonmar/happy/blob/f3848b6673fd274541c61806a34df2911a5c7fc6/happy.cabal#L148-L151

I would love to make that automatic, but that requires haskell/cabal#7189. Maybe off by default would also be good, but that's a breaking change due to the attribute grammar stuff going away.

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 a pull request may close this issue.

3 participants