Skip to content

"Expecting else" error message #917

Closed
@cjauvin

Description

@cjauvin

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"

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