Skip to content

[#1715] Various improvements to the JsLIGO pretty printer

Motivation and Context

Resolves #1668 (closed)

Resolves #1715 (closed)


This MR changes the JsLIGO pretty printer to have a more sensible output in various circumstances. Check the commit message for each commit to find out more.


  • compiler
  • website
  • webide
  • vscode-plugin
  • debugger

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Performance improvement (non-breaking change that improves performance)
  • None (change with no changelog)


Improve the JsLIGO pretty-printer to have a more sensible output. For example suppose a code like this:

namespace C {
    export type bar = int;
    export type foo = [bar, bar];

Previously, the user might see something like this:

namespace C{export type bar = int;
  export type foo =


Now, it will be much more sensible (like the original code).


  • Changes follow the existing coding style (use dune @fmt to check).
  • Tests for the changes have been added (for bug fixes / feature).
  • Documentation has been updated.
  • Changelog description has been added (if appropriate).
  • Start titles under ## Changelog section with #### (if appropriate).
  • There is no image or uploaded file in changelog
  • Examples in changed behaviour have been added to the changelog (for breaking change / feature).

Merge request reports