Well, if your module doesn’t have an explicit export list – as @jaror shows – then in effect it exports every top-level name declared in the module. (You haven’t named your module Main, so Haskell expects this isn’t ‘the’ ‘commanding’ module.)
Yeah, I don’t know either. Seems VS Code is being over-bureaucratic. If your module is being imported somewhere else, you’ll need to change all the usage sites to the new name – although the imports might or might not name your id explicitly.
Perhaps for VS Code in general/not specific to Haskell, you can rename across a whole application/multiple modules as one operation? And VS Code will go off cross-referencing by export/import names(?)
In my case I have no big project, just this module as a stand-alone file which load into ghci. – It feels a bit over the top just in order to satisfy the editor to add some export clauses… Would be nice if VS Code could deal with that. (For the moment I use plain find/replace to get around this limitation.)
When I last checked, HLS explicitly disallows renaming exported bindings. Maybe the error is due to this problem, which means there would be no satisfactory workaround…
For now I use just VS Code’s language-independent search-and-replace commands, but they are pretty cumbersome and fragile in comparison with a proper Replace Symbol command…
When you enable (experimental) crossModule renaming, than you can rename symbols local to a module perfectly without any export list! For how to do it in VS Code, see this comment in the issue.