Open FrigoEU opened 9 years ago
I think the purescript error format changed recently and I haven't updated purscheck to reflect that. The regular expression that captures the errors needs to be changed.
Should be fixed in the latest master.
Sorry to bother you again, but I've been trying for hours yesterday to get this to work, but I'm still only getting a fraction of the errors. I've been fiddling with the regexp to somehow match the different kind of errors I want flycheck to catch, but it's just not happening. Is there some way for me to easily test/debug what purscheck is doing and why the regex is not matching?
@FrigoEU no problem, feel free to write any time, I don't mind.
The problem in your case could be the filename - I'll try to fix it.
edit: I tried your exact same file, and I get the error reported by flycheck. Are you sure you tried the latest master? I updated it yesterday
Hey @spion ,
Yup I'm using the latest one. I rebuilt everything again just now just in case, and did a clean copy-paste of purscheck.el . I'm getting more and more the feeling however that the problem is not in the regexp. I wanted to compile a list of errors, mentioning whether each case gets picked up by flycheck or not. However I came across these two cases:
First one, trying to make an instance of typeclass Foldable without importing the necessary package. This one does not get shown in Flycheck:
Error in module Main:
Error at src\Main.purs line 12, column 1 - line 12, column 48:
Unknown type class Foldable
See https://github.com/purescript/purescript/wiki/Error-Code-UnknownTypeClass for more information, or to contribute content related to this error.
The second case, where I uncomment the implementation of function sum. This one does show up in Flycheck:
Error in module Main:
Error at src\Main.purs line 3, column 1 - line 5, column 1:
Orphan type declaration for sum
See https://github.com/purescript/purescript/wiki/Error-Code-OrphanTypeDeclaration for more information, or to contribute content related to this error.
I can't figure out why the regex would match the second case and not the first.
Just some extra info: Windows 8.1, Emacs 25.0 (not 24.4 as I mentioned earlier), Flycheck v0.23snapshot, Purescript v0.6.9.3, running compiler with psc src\Main.purs .
Do you mean Emacs 24.5 pretest? I haven't tried purscheck in it yet.
I wondered if its flycheck not recognizing the backslash as part of the path (expecting a regular slash instead), but it doesn't seem to be that either.
I just downloaded the official 24.4 release, wiped all my modules and just installed flycheck and haskell mode and added purscheck.el to my init.el, and I'm still getting the same results.
Okay, I updated the regex to handle multiple errors being reported for a file. Can you check if that helped?
Unfortunately, that hasn't helped either. Is there something inside purscheck.hs that could cause this? Maybe different error codes being returned from the compiler or something? I'm not a very good purescript or haskell programmer so unfortunately I've been unable to figure what exactly is going on under the hood there.
Anyway, thanks already for all the help already, much appreciated!
@FrigoEU I have no idea whats going on. Everything is working fine here (but I'm testing on OS X and Linux - haven't had the chance to test on Windows).
But feel free to post examples and maybe I'll be able to reproduce the issue with one of them.
Totally understand. This evening I'll boot up my Linux partition and see if I can also reproduce it there. I'll keep you posted.
OK, managed to get it running on Linux and it works flawlessly! Needless to say I'll just use Linux and bench Windows for Purescript. Thanks!
Added support for windows style new lines (\r\n
). Maybe that helps?
Nope, still the same. Works on Linux, doesn't work on Windows.
Hey,
Just started with Purescript and I'm using purscheck while working through the examples in the Purescript book. I seem to not be able to get purscheck to catch all errors emitted by the compiler. For example I have this file:
purscheck is not getting any errors out of this, but when I just run psc src\Data\Hashable.purs it gives me this error:
Is some of my configuration still off? Running purescript v0.6.9.3, Windows 8.1, emacs 24.4.