Dice Question Streamline Icon: https://streamlinehq.com

Reusing Existing Parsing Libraries in the K7 Cassette Framework

Develop a technique to integrate off‑the‑shelf parser combinator libraries into the K7 cassette framework of bidirectional CPS string transformers (i.e., pairs of Tr-based string transformers composed as categories/monoids), enabling reuse of existing parsers while preserving the tuple‑trouble‑free ergonomics of K7 descriptors.

Information Square Streamline Icon: https://streamlinehq.com

Background

The paper introduces K7 (cassette) descriptors that pair CPS string transformers to obtain invertible (parse/print) format descriptions without tuple aggregation. This yields excellent ergonomics and associative composition but is limited in expressivity compared to monadic approaches.

For practical adoption, the authors emphasize the value of reusing mature, off‑the‑shelf parsing and pretty‑printing libraries. While their stacked‑monad solution can reuse such libraries, they explicitly state that they do not know how to reuse parsing libraries with the K7 approach, highlighting a concrete integration gap between theory and practice.

References

We don't know, however, how to reuse parsing libraries in the {K7} style.

Invertible Syntax without the Tuples (Functional Pearl) (2508.09856 - Boespflug et al., 13 Aug 2025) in Assessment, Further considerations