haskell / happy

The Happy parser generator for Haskell
Other
286 stars 84 forks source link

No bootstrapping #170

Closed int-index closed 4 years ago

int-index commented 4 years ago

Before this patch, building happy required a pre-built binary of happy. This was elegant in the same way a self-hosting compiler is elegant. But it also made building purely from source more complicated than needed.

This patch introduces a small, bespoke parsing library, and applies it for parsing .y and .ly files.

Now happy doesn't depend on itself, and can be built using just GHC.

Closes #169

int-index commented 4 years ago

We discussed this with @simonmar elsewhere and concluded that a better solution (for now) would be to check in Happy-generated files.

Ericson2314 commented 3 years ago

Could we do it both ways, using compiler flags or something to switch between the too? Beyond bootstrapping, I think this is useful to test happy.

Ericson2314 commented 3 years ago

@simonmar Maybe see:

  1. @bgamari worrying about making happy a submodule in GHC: https://mail.haskell.org/pipermail/ghc-devs/2020-August/019111.html
  2. Me responding suggesting something along these lines https://mail.haskell.org/pipermail/ghc-devs/2020-December/019397.html

It is nice to have the submodule so we can have GHC branches using alex/happy branches, whether to demonstrate new features, or as in the recent case, that a branch changing the primops works at all.