Your environment
VsCode
Which OS do you use?
MacOs
Which version of GHC do you use and how did you install it?
9.12.4 ghcup
How is your project built (alternative: link to the project)?
Cabal
Which LSP client (editor/plugin) do you use?
Which version of HLS do you use and how did you install it?
Have you configured HLS in any way (especially: a hie.yaml file)?
Steps to reproduce
Here is a simple reproducer, it requires two modules:
module Angle where
data Angle = Angle Double deriving (Show, Eq)
(+) :: Angle -> Angle -> Angle
(+) (Angle a1) (Angle a2) = Angle (a1 Prelude.+ a2)
module Main where
import Angle (Angle)
import Angle qualified as A
main :: IO ()
main = putStrLn "Hello, Haskell!"
data Rec = Rec { field1 :: Angle, field2 :: Angle } deriving (Show, Eq)
updateRec :: Rec -> Rec
updateRec r = Rec (field1 r A.+ A.Angle 10) (field2 r A.+ A.Angle 20)
Expected behaviour
Clicking on the field1= box that appears because of Convert to traditional record syntax, you should get
updateRec r = Rec { field1 = (field1 r A.+ A.Angle 10), field2 = (field2 r A.+ A.Angle 20) }
Actual behaviour
You get
updateRec r = Rec { field1 = (field1 r + Angle 10), field2 = (field2 r + Angle 20) }
With all qualified names gone.
Your environment
VsCode
Which OS do you use?
MacOs
Which version of GHC do you use and how did you install it?
9.12.4 ghcup
How is your project built (alternative: link to the project)?
Cabal
Which LSP client (editor/plugin) do you use?
Which version of HLS do you use and how did you install it?
Have you configured HLS in any way (especially: a
hie.yamlfile)?Steps to reproduce
Here is a simple reproducer, it requires two modules:
Expected behaviour
Clicking on the
field1=box that appears because ofConvert to traditional record syntax, you should getActual behaviour
You get
With all qualified names gone.