Open
Description
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:
- support working with the expression that precedes it,
- 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 # -- ...