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

haskell-indentation mode sometimes can't parse multiline string literals #324

Closed
kini opened this issue Aug 21, 2014 · 2 comments
Closed

Comments

@kini
Copy link
Contributor

kini commented Aug 21, 2014

As title. The following code produces parse errors if you hit tab after the last line:

main :: IO ()
main = do
  putStrLn "\
  \foo\
  \bar"

So does this code:

main :: IO ()
main = do
  putStrLn "\
  \foo\
 \bar"

But this code doesn't produce a parse error (though the tab stop produced is a little odd)

main :: IO ()
main = do
  putStrLn "\
  \foo\
   \bar"

Same with all of these code samples:

main :: IO ()
main = do
  putStrLn "\
   \foo\
  \bar"
main :: IO ()
main = do
  putStrLn "\
   \foo\
   \bar"
main :: IO ()
main = do
  putStrLn "\
 \foo\
 \bar"

All the examples above are compiled by GHC without complaint.

@gracjan
Copy link
Contributor

gracjan commented Mar 26, 2015

This one got slightly better due to #552, but not exactly right yet.

@gracjan
Copy link
Contributor

gracjan commented Feb 16, 2016

This seems to be fixed properly by now. Leave a message here if you disagree.

@gracjan gracjan closed this as completed Feb 16, 2016
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