Skip to content

new hardline behavior changes multiline strings #189

@vmchale

Description

@vmchale

With prettyprinter (due to #139 I think) <1.7 it prints

vanessa@vanessa-desktop ~/programming/haskell/done/dickinson 🌸 cat lib/cowsay.dck -E
%-$
$
(:def cowsay$
  (:lambda txt text$
    '''$
    $
    ${txt}$
    ------$
          \   ^__^$
           \  (oo)\_______$
              (__)\       )\/\$
                  ||----w |$
                  ||     ||$
    '''))$

With the new behavior, this is:

%-$
$
(:def cowsay$
  (:lambda txt text$
    '''$
$
    ${txt}$
    ------$
          \   ^__^$
           \  (oo)\_______$
              (__)\       )\/\$
                  ||----w |$
                  ||     ||$
    '''))

Unfortunately there's no way to say "keep indentation that would otherwise be blank after newline" - and getting rid of the empty whitespace changes the meaning of the whole string (I think something similar might happen in Dhall?).

Perhaps a new combinator?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions