Hey, everyone! I’d like to announce the initial release of
tidy-codegen makes it super easy to construct PureScript syntax and print it using the
The key design space of this library is that it lets you construct the types from
purescript-language-cst-parser directly (just without whitespace annotations). This means you can parse external code and embed it directly! In fact, as part of our snapshot testing, we parse
Tidy.Codegen, pull out all the example code, parse that, and codegenerate a module which then codegenerates a module from those examples (see here and here). A codegenerator codegenerator . So meta!
tidy-codegen exposes a
CodegenT transformer, which tracks imports and exports so you don’t have to. Just use
importFrom wherever you need to, and all your imports will be tracked, deduplicated, and sorted.
Hope y’all find it useful!