Skip to content

haskell-process-load-file error (wrong-type-argument number-or-marker-p nil) when code has an error #1004

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
XinhuaZhang opened this issue Nov 28, 2015 · 10 comments

Comments

@XinhuaZhang
Copy link

Hello,

When I use C-c C-l, which is haskell-process-load-file command, and if there is an error in my code, this error shows. However, if the code is correct, then there is no such error.

(wrong-type-argument number-or-marker-p nil)

If I use :l filename.hs in the haskell buffer, it works correctly, no error at all.

I wonder what is going on?

@gracjan
Copy link
Contributor

gracjan commented Nov 29, 2015

@bergey, is this because of your recent changes?

@gracjan gracjan changed the title Haskell process command errored with: (wrong-type-argument number-or-marker-p nil) haskell-process-load-file error (wrong-type-argument number-or-marker-p nil) when code has an error Nov 29, 2015
@XinhuaZhang
Copy link
Author

I have the other computer which has an old version 20151102.256 and it works fine.

@bergey
Copy link
Contributor

bergey commented Nov 30, 2015

@XinhuaZhang Can you run M-x toggle-debug-on-error and post the backtrace for that wrong-type-argument? Also, on the computer running 21151102.256, is the command that works fine haskell-process-load-file or haskell-process-load-or-reload? b0f04d1 changed the default binding for C-c C-l

I haven't managed to reproduce this yet. When I have an error in my haskell file, haskell-process-load-file shows an error in the minibuffer, like Setup.hs:2:8: Not in scope: ‘defaultMain’ or Parse error: naked expression at top level.

@gracjan Maybe, but it's not obvious to me how. I didn't change haskell-process-load-file at all. I'm happy to take point on fixing it, since I've looked at these functions recently.

@XinhuaZhang
Copy link
Author

@bergey After I run M-x toggle-debug-on-error and then run either haskell-process-load-file or haskell-process-load-or-reload there is no backtrace showing up. haskell-process-reload has the same problem.

@XinhuaZhang
Copy link
Author

@bergey I think I have figured out the problem. The path to the file is something like "abc/Ubuntu One/def", there is a space between Ubuntu and One. There is no Ubuntu One any more, I am still doing my work in the directory somehow.

@bergey
Copy link
Contributor

bergey commented Nov 30, 2015

Aha! Thanks for following up. I was stumped trying to reproduce the issue. Do you mean that you moved the Haskell file, and emacs doesn't know about the rename? Can we close this, or is there still a problem that we should fix?

@XinhuaZhang
Copy link
Author

If there is no space in the path to the Haskell file, then it is fine.

@gracjan
Copy link
Contributor

gracjan commented Nov 30, 2015

Supporting spaces in project paths is one of the things that we should do someday.

@Ericson2314
Copy link

^ I hope there is an issue for that?

@gracjan
Copy link
Contributor

gracjan commented Jan 24, 2016

There is now :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants