IntersectMBO/plutus

A way to turn off indentation in the pretty-printer

Open

#5,917 opened on Apr 22, 2024

View on GitHub
 (0 comments) (0 reactions) (0 assignees)Haskell (1,637 stars) (511 forks)batch import
Good first issueLow priorityTextual representationstatus: triaged

Description

@kwxm asks for a feature:

It might be useful to be able to turn off the indentation completely. I find that largish textual programs quickly become too large and too wide to read when I prettyprint them, so I end up using sed to transform the output. For example, the uniswap-3 script is 12721 bytes of flat, but when I convert it to textual form I get 24029 lines of output, the longest of them being 732 characters wide. There's a total of 10,221,880 characters, but if I delete all of the leading spaces that goes down to 105,491, which is a bit more manageable.

This should perhaps be just an additional flag in the pretty-printing config and a carefully placed group calls. Although we might have hardlines in the pretty-printing code.

Contributor guide

A way to turn off indentation in the pretty-printer · IntersectMBO/plutus#5917 | Good First Issue