haskell / haskell/haskell-language-server

Hole fits: Don't suggest trivial infinite recursion

Open
#1,804 2 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

It would be nice if hole fits wouldn't suggest trivial infinite recursion.

If I write the code
```haskell
foobar :: Foo -> Bar
foobar = _
```

I would almost never want the definition

```haskell
foobar :: Foo -> Bar
foobar = foobar
```

Currently, this is the first suggestion it gives.

----

_Originally posted by @anka-213 in https://github.com/haskell/haskell-language-server/issues/883#issuecomment-671921399_

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.