Skip to content
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

here-docs for multiple lines #58

Open
ikngtty opened this issue Mar 27, 2020 · 0 comments
Open

here-docs for multiple lines #58

ikngtty opened this issue Mar 27, 2020 · 0 comments
Assignees

Comments

@ikngtty
Copy link
Member

ikngtty commented Mar 27, 2020

cf. #57

In Haskell, literal string syntax for multiple lines is cumbersome.

"case x of\n" <>
"  Foo -> 1\n" <>
"  Bar x -> 2"

Now, here-docs are introduced ( #57 ), but they are not suitable for multiple line strings because their indentation is not smart.

      it "data constructor" $
        parseExpr
        [rawS|case x of
  Foo -> 1
  Bar x -> 2|]
        `shouldParse`
        -- ...

This is unclear and ugly!

New here-docs like below is desired.

[multiline|case x of
          |  Foo -> 1
          |  Bar x -> 2
|]
@ikngtty ikngtty self-assigned this Mar 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant