| Copyright | (c) Hangil Kim 2026 Kairon Johnson 2026 Leonidas Sallos 2026 Oscar Abelanet 2026 |
|---|---|
| License | MIT |
| Maintainer | kimhang@oregonstate.edu |
| Stability | experimental |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
LHMake.Text.Happy.Pretty
Contents
Description
This module provides a basic pretty-printer for Happy abstract syntax trees that includes embedded Haskell.
Pretty-printer
pprHappy :: BookendedAbsSyn -> String Source #
The happy-lib library exposes a function for pretty-printing abstract syntax, but it doesn't include any Haskell.
Since we need to generate complete Happy files, we define our own Happy pretty-printer.
Currently, the pprHappy function automatically inserts the -XOverloadedStrings extension,
since pragma information is omitted from the header.