Crash with `:pf`
jacobjwalters opened this issue · 3 comments
jacobjwalters commented
Upon calling :pf f (a,b,c) = g a b c
, pointfree'
throws an exception and crashes the entire bot. This should be properly caught.
owenbot-exe: pointfree: not supported: PTuple () Boxed [PVar () (Ident () "a"),PVar () (Ident () "b"),PVar () (Ident () "c")]
CallStack (from HasCallStack):
error, called at ./Plugin/Pl/Parser.hs:8:14 in pointfree-1.1.1.8-I2W1iGuieXp7A9292pxyGI:Plugin.Pl.Parser
I had a peek at the source, and I can't immediately see any exception throwing (in fact, the function returns Maybe String
, so I'm surprised we have this problem).
social-anthrax commented
Is the error thrown due to the mishandling of the Maybe or within the function itself?
jacobjwalters commented
Within the function it seems, as it's a custom error thrown by pointfree
.
Exceptions should be caught by the Command stuff (according to yuto), so it's doubly strange.
social-anthrax commented
Time to go open a PR with them I guess
That or it could be worth trying to catch any errors raised by that function.