Skip to content

Multi line string editing #727

Closed
Closed
@hvr

Description

@hvr

I'm writing down this feature request in case somebody may be interested implementing this... :-)

Haskell2010 allows for multi-line strings via \ \-gaps (w/o requiring to invoke TH+QQ which IMO is overkill if it's just to be able to write here-docs-ish multi-line strings), e.g.

longStr = "Lorem ipsum dolor sit amet, \
          \consectetur adipiscing elit, \
          \sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. \
          \Ut enim ad minim veniam, \
          \quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat."

haskell-mode could provide a way to "zoom" (think of a lens =) ) into that string-literal via a temporary buffer, allowing to edit the string, and when finished, update the string-literal in the Haskell code.

One may optionally want to allow to convert \n to/from newlines in the string-buffer-view. As well as allow to convert string-literals with \ \-gaps to ones w/o such gaps (this is sadly needed when enabling CPP).

See haskell-string-literal-decode1 where I included support for string-gaps while decoding (with this ticket's feature in mind...)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions