IntersectMBO/plutus

A way to turn off indentation in the pretty-printer

Open

#5,917 建立於 2024年4月22日

在 GitHub 查看
 (0 留言) (0 反應) (0 負責人)Haskell (1,637 star) (511 fork)batch import
Good first issueLow priorityTextual representationstatus: triaged

描述

@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.

貢獻者指南

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