haskell / haskell/haskell-language-server

Using `-fprint-explicit-kinds` causes invalid type signature suggestions.

Open
#4,601 1 comment 2 reactions 0 assignees View on GitHub
component: hls-refactor-plugin type: bug
Dominant language
Haskell
Stars
3k
Forks
455
Avg merge
2d 19h
Merged PRs (30d)
11

Description

### Your environment

ghc 9.10 with vscode

### Steps to reproduce

```
{-# LANGUAGE UnliftedNewtypes #-}
module Main (main) where
import GHC.Exts

main :: IO ()
main = putStrLn "Test suite not yet implemented."

type Poly :: forall {r}. TYPE r -> TYPE r
newtype Poly a = Poly a

bar (Poly a) = a + a
```

Using code like this with a cabal file that enabled `-fprint-explicit-kinds` suggest the type signature `bar :: forall {a}. Num a => Poly @{LiftedRep} a -> a` which does not parse.

### Expected behaviour

Suggested type signatures should always work.

### Actual behaviour

This one doesn't.

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.