Skip to content

Latest commit

 

History

History
48 lines (31 loc) · 1.88 KB

README.md

File metadata and controls

48 lines (31 loc) · 1.88 KB

flippre: FliPpr, embedded

flippre is an embedded implementation of FliPpr, an invertible pretty-printing system. The library provides functions and datatypes that enable you to define pretty-printers in a functional programming style while ensuring they remain invertible to produce context-free grammar (CFG) parsers. (The current implementation relies on the Earley library for parsing.)

This repository consists of four packages:

Build Instructions

You can build the project using either stack or cabal.

Using stack:

stack build

Using cabal

cabal build all

Examples

You can find examples in the flippre-examples directory. For instance, For instance, Arith.hs demonstrates an invertible pretty-printer for simple arithmetic expressions. You can experiment with these examples in a REPL as follows:

Using stack:

stack repl flippre-examples:exe:arith 

Using cabal:

cabal repl arith

Publications