Skip to content

hls-eval-plugin should support working with the expression preceding the comment #3436

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

Open
BlueNebulaDev opened this issue Jan 4, 2023 · 0 comments

Comments

@BlueNebulaDev
Copy link

Whenever I'm writing a long expression split in multiple logical pieces and spanning over multiple lines, I wish I could see the type of each piece, autogenerated by my IDE.

For instance I may write:

value
  & toSend fn1
  & groupBy fn2
  & sequence
  & ...

And I wish I could see:

value           -- m a
  & toSnd fn1   -- m (a, b)
  & groupBy fn2 -- m [(a, b)]]
  & sequence    -- [m (a, b)]
  & ...         -- ...

I believe that what I'm asking for here, is similar to what #709 is about, but a bit more specific.

A possible solution for my needs, that I believe would be easy to implement, would be extending the ability of hls-eval-plugin to:

  1. support working with the expression that precedes it,
  2. write the result in the same line as the comment.

For instance, for the above case, I could write something similar to:

value           -- !> :t #
  & toSnd fn1   -- !> :t #
  & groupBy fn2 -- !> :t #
  & sequence    -- !> :t #
  & ...         -- !> :t #

where !> tells the hls-eval-plugin to place the result in the same line, and # represents the preceding expression (please come up with a better syntax than what I suggested). And the result would look like:

value           -- !> :t # -- m a
  & toSnd fn1   -- !> :t # -- m (a, b)
  & groupBy fn2 -- !> :t # -- m [(a, b)]
  & sequence    -- !> :t # -- [m (a, b)]
  & ...         -- !> :t # -- ...
@fendor fendor changed the title hsl-eval-plugin should support working with the expression preceding the comment hls-eval-plugin should support working with the expression preceding the comment Feb 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants