haskell / haskell/haskell-language-server

Filling type holes can create incomplete signatures due to type variables from context

Đang mở
#711 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
component: ghcide status: needs info type: bug
Ngôn ngữ chính
Haskell
Star
3k
Fork
455
Merge trung bình
2 ngày 19 giờ
Pull request đã merge (30 ngày)
11

Mô tả

I have for example the following situation:
```
Found type wildcard ‘_’ standing for ‘R.Dynamic t [Task] -> m ()’
Where: ‘t’, ‘m’ are rigid type variables bound by the type signature for: ...
```
It‘s not an import bug right now, but when `t` and `m` are not declared with `forall t m` and `ScopedTypeVariables` the inserted signature for the type hole will probably fail because it's lacking all constraints for `t` and `m`.

I am not sure what the correct solution is:
* One could possibly look for the right constraints in the code and insert them.
* Another (slightly crazy) possibility would be to offer to refactor used variables to explicit scoped type variables.

As I said this is not urgent and I see that a fix might be hard. Nonetheless I thought having the problem noted somewhere might help.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.