Skip to content

Neat lists rendering #8

Open
Open
@Martoon-00

Description

@Martoon-00

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew functionality that may worth a new release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions