haskell / haskell/haskell-language-server

Exactprint: HsLet should needs a leading space

Open
#2,075 0 comments 0 reactions 0 assignees View on GitHub
component: ghcide type: enhancement
Dominant language
Haskell
Stars
3k
Forks
455
Avg merge
2d 19h
Merged PRs (30d)
11

Description

In Wingman, running "Complete case constructors" on the following:

```haskell
let occs = case params of
```

produces the rather ugly:

```haskell
let occs =case params of
IntroduceAllUnnamed -> _
IntroduceOnlyNamed ons -> _
IntroduceOnlyUnnamed n -> _
```

note the missing space before `case`!

I'd think this is as easy as changing this:

https://github.com/haskell/haskell-language-server/blob/master/ghcide/src/Development/IDE/GHC/ExactPrint.hs#L203

but it looks like it's already supposed to insert a space! Is there some other node in the tree that's getting in the way?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.