Hello, On 2024-08-11 21:52:42 -0500, Diego Antonio Rosario Palomino wrote: > Hello, i am a new scheme user trying to exploit the peg library but have > encountered the following error : > > guile c.scm > ;;; note: source file /home/diego/Documents/Guile/c.scm > ;;; newer than compiled > /home/diego/.cache/guile/ccache/3.0-LE-8-4.6/home/diego/Documents/Guile/c.scm.go > ;;; note: auto-compilation is enabled, set GUILEAUTO_COMPILE=0 > ;;; or pass the --no-auto-compile argument to disable. > ;;; compiling /home/diego/Documents/Guile/c.scm > ;;; /home/diego/Documents/Guile/c.scm:20:57: warning: possibly unbound > variable `⇒' > ;;; compiled > /home/diego/.cache/guile/ccache/3.0-LE-8-4.6/home/diego/Documents/Guile/c.scm.go > Backtrace: > In ice-9/boot-9.scm: > 1752:10 6 (with-exception-handler #:unwind? # ) > In unknown file: > 5 (apply-smob/0 #<thunk 7fcf881b52a0>) > In ice-9/boot-9.scm: > 724:2 4 (call-with-prompt #<procedure default-prompt-handle…>) > In ice-9/eval.scm: > 619:8 3 ( #(#(#<directory (guile-user) 7fcf881b9c80>))) > In ice-9/boot-9.scm: > 2836:4 2 (save-module-excursion ) > 4388:12 1 () > In /home/diego/Documents/Guile/c.scm: > 20:57 0 (_) > > /home/diego/Documents/Guile/c.scm:20:57: Unbound variable: ⇒
The arrow character in the documentation is a stand in meaning that A returns B. So in this example: (match-pattern cfunc "int square(int a) { return a*a;}") ⇒ (32 (cfunc (ctype "int") (cname "square") (cargs (carg (ctype "int") (cname "a"))) (cbody (cstatement "return a*a")))) It means that (match-pattern cfunc "int square(int a) { return a*a;}") Returns this value: (32 (cfunc (ctype "int") (cname "square") (cargs (carg (ctype "int") (cname "a"))) (cbody (cstatement "return a*a")))) This is used fairly commonly across Scheme info pages, so it is good thing to know. Hope this helps, Tomas -- There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors.
signature.asc
Description: PGP signature