Skip to content

Commit

Permalink
devel/happy: update to happy-2.1.3
Browse files Browse the repository at this point in the history
## 2.1.2

Fix a breaking change (TritonDataCenter#325) introduced by the previous fix for TritonDataCenter#131.
Prelude is no longer used by Happy.

## 2.1.1

This release fixes two breaking changes:

* Properly qualify all uses of Prelude functions, fixing TritonDataCenter#131
* Bring back the old `%errorhandlertype` directive, the use of which is
  discouraged in favour of the "Reporting expected tokens" mechanism
  in Happy 2.1, accesible via `%error.expected`.

## 2.1

* Added `--numeric-version` CLI flag.
* Documented and implemented the new feature "Resumptive parsing with ``catch``"
* Documented (and reimplemented) the "Reporting expected tokens" feature
  (which turned to cause a breaking change in this release: TritonDataCenter#320)

## 2.0.2

The 2.0.1 release in turn exposed two more regressions:

* Generated code uses PatternGuards without declaring it (TritonDataCenter#309)
* Use of `happy-lib:*` syntax to depend on private library components triggered
  a bug in Cabal versions 3.0 and 3.2 (TritonDataCenter#311)

This release fixes both.

## 2.0.1

The 2.0 release changed the indentation character from tabs to two spaces, triggering an
unforced breaking change in GHC (TritonDataCenter#303).
This release provides the fix by using eight spaces for indentation.

## 2.0

There are two main breaking changes in this release:

1. Removed 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 (TritonDataCenter#273).
   This causes us to drop support for GHC < 8.0.

Furthermore, the project structure was modularized and a library `happy-lib`
containing the implmentation of the `happy` executable was extracted.

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.

Other, more minor changes:

* Revert the new bootstrapping system of 1.21.0 to mitigate build issues (TritonDataCenter#255, TritonDataCenter#274).

* Encode action table offsets in 32 bit instead of 16 bit (TritonDataCenter#93, TritonDataCenter#199, TritonDataCenter#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 (TritonDataCenter#199).

* The documentation has been converted to ReStructuredText,
  hosted at https://haskell-happy.readthedocs.io/en/latest/ (TritonDataCenter#226)

* A few internal refactorings to the structure of generated code.
  • Loading branch information
0-wiz-0 committed Jan 9, 2025
1 parent 7e590ad commit 29e3c50
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 99 deletions.
27 changes: 3 additions & 24 deletions devel/happy/Makefile
Original file line number Diff line number Diff line change
@@ -1,34 +1,13 @@
# $NetBSD: Makefile,v 1.16 2024/05/09 01:31:43 pho Exp $
# $NetBSD: Makefile,v 1.17 2025/01/09 23:03:38 wiz Exp $

DISTNAME= happy-1.21.0
DISTNAME= happy-2.1.3
PKGNAME= ${DISTNAME}
PKGREVISION= 2
CATEGORIES= devel

MAINTAINER= [email protected]
COMMENT= Parser generator for Haskell
LICENSE= modified-bsd

USE_TOOLS+= autoconf gmake
TOOL_DEPENDS+= docbook-xsl-[0-9]*:../../textproc/docbook-xsl
TOOL_DEPENDS+= libxml2-[0-9]*:../../textproc/libxml2
TOOL_DEPENDS+= libxslt-[0-9]*:../../textproc/libxslt

CONFIGURE_ENV+= fp_cv_dir_docbook_xsl=${PREFIX}/share/xsl/docbook
CONFIGURE_ENV+= ac_cv_path_DbLatexCmd= # empty
pre-configure:
${RUN}cd ${WRKSRC}/doc && autoconf && ${PKGSRC_SETENV} ${CONFIGURE_ENV} \
${CONFIG_SHELL} ${CONFIG_SHELL_FLAGS} ./configure

post-build:
${RUN}cd ${WRKSRC}/doc && ${GMAKE}

INSTALLATION_DIRS+= ${PKGMANDIR}/man1 ${PREFIX}/share/doc/${PKGBASE}
post-install:
${INSTALL_MAN} ${WRKSRC}/doc/happy.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
for f in ${WRKSRC}/doc/happy/*; do \
${INSTALL_DATA} "$$f" ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}/; \
done

.include "../../devel/happy-lib/buildlink3.mk"
.include "../../mk/haskell.mk"
.include "../../mk/bsd.pkg.mk"
42 changes: 1 addition & 41 deletions devel/happy/PLIST
Original file line number Diff line number Diff line change
@@ -1,43 +1,3 @@
@comment $NetBSD: PLIST,v 1.4 2023/10/26 05:41:00 pho Exp $
@comment $NetBSD: PLIST,v 1.5 2025/01/09 23:03:38 wiz Exp $
bin/happy
man/man1/happy.1
share/doc/happy/fptools.css
share/doc/happy/happy-introduction.html
share/doc/happy/index.html
share/doc/happy/ix01.html
share/doc/happy/sec-AtrributeGrammarsInHappy.html
share/doc/happy/sec-AttrGrammarLimits.html
share/doc/happy/sec-AttributeGrammar.html
share/doc/happy/sec-AttributeGrammarExample.html
share/doc/happy/sec-Precedences.html
share/doc/happy/sec-compilation-time.html
share/doc/happy/sec-conflict-tips.html
share/doc/happy/sec-directives.html
share/doc/happy/sec-error.html
share/doc/happy/sec-finding-errors.html
share/doc/happy/sec-glr-misc.html
share/doc/happy/sec-glr-semantics.html
share/doc/happy/sec-glr-using.html
share/doc/happy/sec-glr.html
share/doc/happy/sec-grammar-files.html
share/doc/happy/sec-grammar.html
share/doc/happy/sec-happy-ghci.html
share/doc/happy/sec-info-files-conflicts.html
share/doc/happy/sec-info-files.html
share/doc/happy/sec-invoking.html
share/doc/happy/sec-license.html
share/doc/happy/sec-module-header.html
share/doc/happy/sec-module-trailer.html
share/doc/happy/sec-monad-alex.html
share/doc/happy/sec-monads.html
share/doc/happy/sec-multiple-parsers.html
share/doc/happy/sec-obtaining.html
share/doc/happy/sec-reporting-bugs.html
share/doc/happy/sec-sequences.html
share/doc/happy/sec-tips.html
share/doc/happy/sec-type-signatures.html
share/doc/happy/sec-using.html
share/doc/${HS_PLATFORM}/${PKGNAME}/LICENSE
share/${HS_PLATFORM}/${PKGNAME}/GLR_Base.hs
share/${HS_PLATFORM}/${PKGNAME}/GLR_Lib.hs
share/${HS_PLATFORM}/${PKGNAME}/HappyTemplate.hs
9 changes: 4 additions & 5 deletions devel/happy/distinfo
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
$NetBSD: distinfo,v 1.9 2023/11/02 01:15:01 pho Exp $
$NetBSD: distinfo,v 1.10 2025/01/09 23:03:38 wiz Exp $

BLAKE2s (happy-1.21.0.tar.gz) = 4e89a615c68b1b1227224c2cc92155fbb4f912a9a715f606d592e8a573994ff4
SHA512 (happy-1.21.0.tar.gz) = d63e33fe958865c560eed01e54f3384d09b6b2b2282480db302366492d18a7fd67f530d92206f8ff19e0842942f608a8d226ea66cd947583c78e800f6d580fec
Size (happy-1.21.0.tar.gz) = 173506 bytes
SHA1 (patch-happy.cabal) = 75908ad83a457edc4b2aa11adb9ed1da7937b1de
BLAKE2s (happy-2.1.3.tar.gz) = c0fe6fdff3ab843e46643aafb068ef3628bf9c29a4b2f9257f1b2427e29a6102
SHA512 (happy-2.1.3.tar.gz) = 7ee79869938e53f6a1ad7ae471a1b3ade1692bb4b85aa42cc1eeee71cfb58d606bc777dd1d5eb70438447e1e42d4986e3bcb594e980bdf49c0e2256bd0a7c694
Size (happy-2.1.3.tar.gz) = 61071 bytes
29 changes: 0 additions & 29 deletions devel/happy/patches/patch-happy.cabal

This file was deleted.

0 comments on commit 29e3c50

Please sign in to comment.