{"action":"created","issue":{"url":"https://api.github.com/repos/haskell/haskell-mode/issues/269","repository_url":"https://api.github.com/repos/haskell/haskell-mode","labels_url":"https://api.github.com/repos/haskell/haskell-mode/issues/269/labels{/name}","comments_url":"https://api.github.com/repos/haskell/haskell-mode/issues/269/comments","events_url":"https://api.github.com/repos/haskell/haskell-mode/issues/269/events","html_url":"https://github.com/haskell/haskell-mode/issues/269","id":33560126,"number":269,"title":"Line after \"else do\" does not indent","user":{"login":"ryankask","id":81891,"avatar_url":"https://avatars.githubusercontent.com/u/81891?v=3","gravatar_id":"","url":"https://api.github.com/users/ryankask","html_url":"https://github.com/ryankask","followers_url":"https://api.github.com/users/ryankask/followers","following_url":"https://api.github.com/users/ryankask/following{/other_user}","gists_url":"https://api.github.com/users/ryankask/gists{/gist_id}","starred_url":"https://api.github.com/users/ryankask/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryankask/subscriptions","organizations_url":"https://api.github.com/users/ryankask/orgs","repos_url":"https://api.github.com/users/ryankask/repos","events_url":"https://api.github.com/users/ryankask/events{/privacy}","received_events_url":"https://api.github.com/users/ryankask/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/haskell/haskell-mode/labels/indentation","name":"indentation","color":"bfe5bf"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2014-05-15T07:04:50Z","updated_at":"2016-05-07T18:03:08Z","closed_at":null,"body":"I have ``haskell-indentation`` enabled on On Emacs 24.3.1 and a snapshot of haskell-mode from 12 May.\r\n\r\nI'm working through *Real World Haskell* and I have something like:\r\n\r\n```haskell\r\nmainloop :: Handle -> Handle -> IO ()\r\nmainloop inh outh =\r\n  do ineof <- hIsEOF inh\r\n     if ineof\r\n       then return ()\r\n       else do\r\n    -->inpStr <- hGetLine inh\r\n       hPutStrLn outh (map toUpper inpStr)\r\n       mainloop inh outh\r\n```\r\nThe line that starts with ``inpStr`` will not indent despite pressing tab.\r\n\r\nI don't know if the above is bad style or if there is a different way haskell-indentation expects, but it seems like the line should indent 2 spaces.\r\n"},"comment":{"url":"https://api.github.com/repos/haskell/haskell-mode/issues/comments/217656551","html_url":"https://github.com/haskell/haskell-mode/issues/269#issuecomment-217656551","issue_url":"https://api.github.com/repos/haskell/haskell-mode/issues/269","id":217656551,"user":{"login":"gracjan","id":917978,"avatar_url":"https://avatars.githubusercontent.com/u/917978?v=3","gravatar_id":"","url":"https://api.github.com/users/gracjan","html_url":"https://github.com/gracjan","followers_url":"https://api.github.com/users/gracjan/followers","following_url":"https://api.github.com/users/gracjan/following{/other_user}","gists_url":"https://api.github.com/users/gracjan/gists{/gist_id}","starred_url":"https://api.github.com/users/gracjan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gracjan/subscriptions","organizations_url":"https://api.github.com/users/gracjan/orgs","repos_url":"https://api.github.com/users/gracjan/repos","events_url":"https://api.github.com/users/gracjan/events{/privacy}","received_events_url":"https://api.github.com/users/gracjan/received_events","type":"User","site_admin":false},"created_at":"2016-05-07T18:03:08Z","updated_at":"2016-05-07T18:03:08Z","body":"Did this ever work? There was some code in `haskell-indentation` that tried to sort out if there is more than one line between starter and indentation point and setup `left-indent` accordingly:\r\n\r\n```elisp\r\n        (let* ((on-new-line (= (current-column)\r\n                               (haskell-indentation-current-indentation)))\r\n               (lines-between (- parse-line-number starter-line))\r\n               (left-indent (if (<= lines-between 0)\r\n                                left-indent\r\n                              starter-indent)))\r\n```\r\n\r\nFollowing code tried to somehow use it, but experimentally it does not work."}}