From afcb17b6b4db6726898ddaaf037b8cd47f7d0d00 Mon Sep 17 00:00:00 2001 From: Sebastian Graf Date: Wed, 11 Sep 2024 18:41:13 +0200 Subject: [PATCH 1/4] Release preparations --- ChangeLog.md | 36 +++++++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index 9670a566..5b48d6ed 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -2,21 +2,35 @@ ## 2.0 -The main focus of this release was modularizing Happy. +There are two main breaking changes in this release: -* Generated parsers now activate the language extension `-XNoStrictData` without - which every use of a happy parser would lead to an immediate crash (#273). - This causes us to drop support for GHC < 8.0. +1. Removal non-array, non-GHC modes, so flags `-ag` are the default now and + become no-ops. +2. Generated parsers now activate the language extension `-XNoStrictData` without + which every use of a happy parser would lead to an immediate crash (#273). + This causes us to drop support for GHC < 8.0. -* Break up into libraries: +Furthermore, the project structure was modularized and a library `happy-lib` +containing the implmentation of the `happy` executable was extracted. - - `happy-backend-glr` - - `happy-backend-lalr` - - `happy-frontend` - - `happy-grammar` - - `happy-tabular` +Quite similar to the situation with GHC vs. the GHC API, we expect that `happy` +will continue to be a stable CLI tool with solid (if occasionally out of date) +documentation, while the design, documentation and implementation of `happy-lib` +is still in flux and use is only recommended to expert users. -* Revert the new bootstrapping system of 1.21.0 to mitigate build issues. +Other, more minor changes: + +* Revert the new bootstrapping system of 1.21.0 to mitigate build issues (#255, #274). + +* Encode action table offsets in 32 bit instead of 16 bit (#93, #199, #266). + This increases the size of generated parsers a bit (about 250KB for GHC's + parser), but also manages to generate parsers for grammars that were + previously running into the size limit (#199). + +* The documentation has been converted to ReStructuredText, + hosted at https://haskell-happy.readthedocs.io/en/latest/ (#226) + +* A few internal refactorings to the structure of generated code. ## 1.21.0 From fc2570f16beeb6d50241da61329d7aeb3332dab6 Mon Sep 17 00:00:00 2001 From: Sebastian Graf Date: Mon, 16 Sep 2024 17:22:24 +0200 Subject: [PATCH 2/4] gitignore: .hs files in tests/ --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 13cda316..bf746bb4 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,5 @@ cabal-dev cabal.sandbox.config .*.swp .*.swo -/.vscode/ \ No newline at end of file +/.vscode/ +tests/*.hs From 43df865d8ca5381b8df8ec3cfa7047481d569b3b Mon Sep 17 00:00:00 2001 From: Sebastian Graf Date: Mon, 16 Sep 2024 17:49:38 +0200 Subject: [PATCH 3/4] Fix contributing.rst --- doc/contributing.rst | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/doc/contributing.rst b/doc/contributing.rst index 994aff06..e3dd750a 100644 --- a/doc/contributing.rst +++ b/doc/contributing.rst @@ -16,9 +16,11 @@ feel free to submit them! Repo Layout ----------- -- ``src``: The source code for the Happy executable itself +- ``app``: The source code for the Happy executable itself -- ``packages/*``: The various packages that make up Happy behind the scenes, and are available for reuse for other purposes. +- ``lib/*``: The various internal libraries that make up the ``happy-lib`` + package. This library is used to implement the ``happy`` executable behind the + scenes, and is available for reuse for other purposes. - ``doc``: The documentation @@ -34,20 +36,20 @@ Happy is mostly a normal Cabal-packaged Haskell executable:: $ cabal build -The only wrinkle is that developing Happy's own parser (i.e. the frontend +The only wrinkle is that changing Happy's own parser (i.e. the frontend component that parses ``.y`` files) requires an existing Happy executable on -the PATH. +the PATH to run ``lib/frontend/boostrap.sh``. Do *not* modify these files by hand:: - packages/frontend/src/Happy/Frontend/Parser.hs - packages/frontend/src/Happy/Frontend/AttrGrammar/Parser.hs + lib/frontend/src/Happy/Frontend/Parser.hs + lib/frontend/src/Happy/Frontend/AttrGrammar/Parser.hs Instead, edit these files:: - packages/frontend/boot-src/Parser.ly - packages/frontend/boot-src/AttrGrammarParser.ly + lib/frontend/boot-src/Parser.ly + lib/frontend/boot-src/AttrGrammarParser.ly and regenerate the ``.hs``-files with:: - $ packages/frontend/bootstrap.sh + $ lib/frontend/bootstrap.sh From d7191b7cfe96eeef9ef887f8327d21aa32442870 Mon Sep 17 00:00:00 2001 From: Sebastian Graf Date: Mon, 16 Sep 2024 18:25:07 +0200 Subject: [PATCH 4/4] Add @sgraf812 as maintainer --- doc/introduction.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/introduction.rst b/doc/introduction.rst index c5eb8756..75ff7817 100644 --- a/doc/introduction.rst +++ b/doc/introduction.rst @@ -153,6 +153,8 @@ Current Maintainers - John Ericson (@Ericson2314) +- Sebastian Graf (@sgraf812) + - Simon Marlow (@simonmar) Other contributors