Skip to content

"Expecting else" error message #917

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

Closed
cjauvin opened this issue Oct 6, 2015 · 1 comment
Closed

"Expecting else" error message #917

cjauvin opened this issue Oct 6, 2015 · 1 comment

Comments

@cjauvin
Copy link

cjauvin commented Oct 6, 2015

I'm running haskell-mode version 20151003.0 with Emacs 24.5 on OSX, and I'm new to Haskell (so please bear with me as this might well be a non-issue, caused by my ignorance). I noticed a weird behavior with nested do blocks inside an if expression, which this simple function demonstrates:

test :: Bool -> IO ()
test b = do
  if b then do
    putStr "hello "
    putStrLn "world"
  else do
    -- Starting from this line I get an "Expecting else" message in
    -- tbe minibuffer when I try to insert a newline by pressing
    -- <enter> (except inside the comments)
    putStr "bye "
    putStrLn "world"
@gracjan
Copy link
Contributor

gracjan commented Oct 6, 2015

This is a known extension to Haskell language that needs to be implemented in haskell-indentation. Thanks for reporting this, we have already #884 so it is tracked.

@gracjan gracjan closed this as completed Oct 6, 2015
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

2 participants