Hi simon, Did you get to a workaround that works for you?
Best wishes, Arne Arne Babenhauserheide <arne_...@web.de> writes: > Dear simon, > > Thank you for writing! > > The error-reporting in wisp is currently not at the level of regular > Scheme. For some errors you already get the line numbers, but others > still lack them. > > The happy case: If you run the following via guile --language=wisp > /tmp/test.w, for example, you get the correct line number of the error: > > > define : sqr x > * x x > > define : add1 x > error "foo ~a" 'foo > 1+ x > > add1 2 > > > Adding line number information for compile errors will still take some > time — it should be fixable, but I will have to do more reading up on > Guile compiler internals for that, so I cannot promise a fix within the > next months. > > However you can use a workaround: in case of an error automatically > transform the file to regular scheme and run the compiler on that > again. The line numbers should then match exactly. > > I know that that’s only a workaround, but it should already ease > debugging a lot. I hope it helps you! > > guild compile -f wisp /tmp/test.w || (wisp2lisp /tmp/test.w > /tmp/test.scm > && guild compile /tmp/test.scm) > > > Best wishes, > Arne > > > zimoun <zimon.touto...@gmail.com> writes: > >> Dear, >> >> As you maybe know, the Guix Workflow Language [1] now support the Wisp >> notation [2]. >> And it improves the readibility, IMHO. >> Nice! >> >> >> [1] https://archive.fosdem.org/2017/schedule/event/guixworkflowmanagement/ >> [2] https://git.savannah.gnu.org/cgit/gwl.git/tree/gwl/utils.scm#n34 >> >> >> >> However, Wisp v0.9 does not support (yet?) the location when it fails >> to compile. >> I have not tried the v1.0 because it is not packaged in Guix, yet. :-) >> >> Just to fix the idea: >> >> define : sqr x >> * x x >> >> define add1 x >> 1+ x >> >> >> then `guild compile -f wisp ~/tmp/test.w` fails with: >> >> ice-9/boot-9.scm:752:25: In procedure dispatch-exception: >> Syntax error: >> unknown location: source expression failed to match any pattern in >> form (define add1 x (#{1+}# x)) >> >> and it is not always to find where the location is. Compared to the >> Lisp notation, the line is pointed: >> >> ice-9/boot-9.scm:752:25: In procedure dispatch-exception: >> Syntax error: >> /home/simon/tmp/test.scm:5:0: source expression failed to match any >> pattern in form (define add1 x (#{1+}# x)) >> >> >> Does it seem fixable ? >> >> >> Thank you in advance for any comments. >> >> All the best, >> simon >> >> ps: >> I do not if there is a dedicated mailing list about Wisp or a bug tracker. >> Sorry if it is incorrectly addressed and let me know where to post. -- Unpolitisch sein heißt politisch sein ohne es zu merken
signature.asc
Description: PGP signature