Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Neat lists rendering #8

Open
Martoon-00 opened this issue Mar 1, 2022 · 0 comments
Open

Neat lists rendering #8

Martoon-00 opened this issue Mar 1, 2022 · 0 comments
Labels
feature New functionality that may worth a new release

Comments

@Martoon-00
Copy link
Member

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.
@Martoon-00 Martoon-00 added the feature New functionality that may worth a new release label Mar 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New functionality that may worth a new release
Projects
None yet
Development

No branches or pull requests

1 participant