Open
Description
Clarification and motivation
There should be a simple way to render lists so that bullets and indentation are handled neatly. Which target texts do we want to support:
Multiline:
List:
- a;
- b;
- c;
and single-line
List: [a, b, c]
Let's do our best to follow the principle that the Haskell code should be as close as possible to the target text.
How it can be implemented
We can allow typing something like this
txt = [int||
List:
- #b*{ myList };
|]
for multiline list, this will take the - #{}
line and use it as a template.
Single-line list support is not so important I guess, one can easily use some Haskell function to format the text. But if there is a nice design suggestion for it, we can do something here too.
Acceptance criteria
- One can easily render
Foldable
containers, using the specified rendering mode for each element, and providing custom indentation and bullets. - This is designed so that Haskell code looks similar to the resulting text.