Skip to content

Latest commit

 

History

History
53 lines (33 loc) · 1.52 KB

contributing.rst

File metadata and controls

53 lines (33 loc) · 1.52 KB

Contributing to Happy

Source Code Repository

Happy is hosted on GitHub. As previously discussed in `bug-reports`_, we use the built-in GitHub issue tracker for Happy. We also use GitHub pull requests for managing changes; feel free to submit them!

Repo Layout

  • src: 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.

  • doc: The documentation

    This is in reStructured Text format as is common for many Haskell tools' documentation. To build the documentation, use [Sphinx](https://www.sphinx-doc.org/).

  • examples: Various examples of using Happy

Build Instructions

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 component that parses .y files) requires an existing Happy executable on the PATH.

Do not modify these files by hand:

packages/frontend/src/Happy/Frontend/Parser.hs
packages/frontend/src/Happy/Frontend/AttrGrammar/Parser.hs

Instead, edit these files:

packages/frontend/boot-src/Parser.ly
packages/frontend/boot-src/AttrGrammarParser.ly

and regenerate the .hs-files with:

$ packages/frontend/bootstrap.sh