haskell / haskell/haskell-mode

Lack of indentation in "do" block

Open
#1,687 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
Emacs Lisp
Stars
1.4k
Forks
354
Avg merge
5d 10h
Merged PRs (30d)
2

Description

## What I expect

```
showDisplayItem :: DisplayItem -> IO String
showDisplayItem (Item dt (MixerControl m c mi) l) =
flip catch (const warn) $ AM.withMixer m $ \m' -> do
c' <- case mi of
Nothing -> AM.getControlByName m' c
Just i -> controlAtIndex m' c i
case c' of
Nothing -> warn
Just c'' -> case dt of
Switch -> showSwitches c'' l
Db -> showDb c'' l
where warn = return $ Colors.text Colors.warn l
```

## What I get

```
showDisplayItem :: DisplayItem -> IO String
showDisplayItem (Item dt (MixerControl m c mi) l) =
flip catch (const warn) $ AM.withMixer m $ \m' -> do
c' <- case mi of
Nothing -> AM.getControlByName m' c
Just i -> controlAtIndex m' c i
case c' of
Nothing -> warn
Just c'' -> case dt of
Switch -> showSwitches c'' l
Db -> showDb c'' l
where warn = return $ Colors.text Colors.warn l
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.