I don't know I did this, but somehow I got in a state where my Cabal file had 3 stanzas, all with a full "other-modules" section, and no buildwrapper errors or Problems in the UI. But, in the structured UI view of the Cabal file, all the checkboxes for the stanza #2 where unchecked. As a result, I think that the model for the cabal was not "aware" of these module declarations.
Once the "Other modules" get unchecked in the UI view of the cabal file, but the cabal source text remains, the following misbehavior happens:
When I Move or Rename a module, the Cabal file's "other-modules" secion is updated to track the module's new name.
However, in a project with multiple stanzas that use the renamed module, sometimes not every stanza is updated with the new name.
After the Refactor is finished, the Cabal file is invalid, and buildwrapper fails to build, with an error like:
My (bad) guess is that in /net.sf.eclipsefp.haskell.ui/src/net/sf/eclipsefp/haskell/ui/internal/refactoring/participants/Util.java
in the loop over stanzas, somehow the some stanzas' changes are not getting saved when a later stanza is processed.
cabal.exe: can't find source for Test\Test in src,
(after renaming Test.Test to a different name)
Unfortunately, I can't reproduce this with a simple test case.
However, I have reproduced the misbehavior many times in one project.
Feel free to close this issue as not-reproducible, but I wanted to file a report that it happened once.