haskell-boxes / boxes

A pretty-printing library for laying out text in two dimensions, using a simple box model.
Other
37 stars 13 forks source link

Add instance Semigroup, or even Monoid? #33

Closed kindaro closed 3 years ago

kindaro commented 5 years ago

<> in Boxes shadows the usual semigroup operation, while functioning in a compatible way. (I am ignoring the internal hierarchical representation for now. Be it necessary, we can perform simplification when concatenating.) There is also nullBox that we can make neutral element.

Surely this will simplify the usage of this package in the modern ecosystem.

I can take a shot at making the necessary adjustments.