Closed
Description
Your environment
Using VS Code as LSP client with Haskell 9.2.5 via ghcup on macOS. HLS is on 1.9.1
Steps to reproduce
Write a simple module Cnt.hs
:
-- File Cnt.hs
module Cnt where
mostFrequentChar' :: String -> Char -> Int -> (Char, Int)
mostFrequentChar' [] maxChar maxFreq = (maxChar, maxFreq)
mostFrequentChar' (c:cs) maxChar maxFreq =
let freq = count c (c:cs)
in if freq > maxFreq
then mostFrequentChar' cs c freq
else mostFrequentChar' cs maxChar maxFreq
where count x xs = length $ filter (== x) xs
No exports needed. (I will load the file into ghci to play with it.)
Then try to rename mostFrequentChar'
to mostFrequentChar
.
Expected behaviour
I expected that mostFrequentChar'
is changed to mostFrequentChar
.
Actual behaviour
No renaming is performed, but you get (in VS Code):
See also
I discussed this problem first on the Haskell discourse.