You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When an error appears in a different file than the currently-loaded one, ghci outputs a relative file name. Thus, if "/var/project/src/Foo/Bar.hs" is loaded but user is looking at "/var/project/src/Baz/Quux.hs", an error in Baz.Quux will print for "src/Baz/Quux.hs"; whereas if it was in the loaded file, it gets a full/absolute path.
The problem occurs when default-directory does not match the session directory: with a relative path, file-truename simply appends default directory. For our example, that would be "/var/project/src/Baz", resulting in the erroneous value of "/var/project/src/Baz/src/Baz/Quux.hs", which will obviously fail the comparison above.
The workaround is to overwrite default-directory with the session current-dir:
Problem is in
haskell-process-errors-warnings
when comparing current buffer file name to the warning result:haskell-mode/haskell-load.el
Lines 547 to 548 in 98ba392
When an error appears in a different file than the currently-loaded one, ghci outputs a relative file name. Thus, if "/var/project/src/Foo/Bar.hs" is loaded but user is looking at "/var/project/src/Baz/Quux.hs", an error in Baz.Quux will print for "src/Baz/Quux.hs"; whereas if it was in the loaded file, it gets a full/absolute path.
The problem occurs when
default-directory
does not match the session directory: with a relative path,file-truename
simply appends default directory. For our example, that would be "/var/project/src/Baz", resulting in the erroneous value of "/var/project/src/Baz/src/Baz/Quux.hs", which will obviously fail the comparison above.The workaround is to overwrite
default-directory
with the session current-dir:This resolves the issue, at the cost of setting
default-directory
for the buffer to the session directory, which is probably not great.The text was updated successfully, but these errors were encountered: