IRC channel logs

2026-02-01.log

back to list of logs

<mwette>old: If you had this issue (IIRC), did you find a way to use `_' in macros w/o the syntax error popping up?
<old>mwette: what issue are you refering to?
<mwette>old: never mind. I'm not sure it was you. Did you try to use _ in a macro and run into issues with syntax-violation?
<mwette>My stuff seems to be working : I needed to export all the sub-macros.
<mwette>thanks
<old>hmm I often just use _ as the first parameter of syntax-cases/rules
<old>but that's it
<old>often if I have a syntax-violation that involves _ is because I forgot the import (ice-9 match)
<mwette>in other contexts error occurs: bad use of '_' syntactic keyword in subform _ of _
<old>do you have a paste bin I can try?
<mwette>ACTION afk
<mwette>I can't duplicate earlier error.
<old>oh well :p
<old>Well if I try to compile this: _
<old>I get: /home/old/foo.scm:1:0: _: bad use of '_' syntactic keyword in subform _ of _
<old>and if I try to compile: (lambda () _)
<old>I get: /home/old/foo.scm:1:0: lambda: bad use of '_' syntactic keyword in subform _ of (lambda () _)
<old>sorry: /home/old/foo.scm:1:0: lambda: bad use of '_' syntactic keyword in subform _ of (lambda () _)
<old>what seems to be the problem?
<mwette>different problem: if you really want to re-create, use https://paste.debian.net/hidden/fbb397f3 and (use-modules (smatch)) (smatch '(1 2 3) ((_ #t)))
<mwette>the issue is I needed to export all the macros, not just the one called
<old>ahh
<old>I don't know if that could be specific to define-macro ?
<old>I've never used it personnaly
<old>I always go with syntax-cases
<old>mwette: yup
<old>here:
<old> https://paste.sr.ht/~old/d3ab08ed348826b2628d36e4fe647c1f2e938f4a
<old>no more syntax-error
<mwette>yea -- I don't think syntax-rules has that visibility issue
<mwette>define-macro is for a non-guile implementation
<old>yea. basically, you need to make all none-export in canonical form with @@
<old>which syntax-cases does for you AFAIK
<old>maybe you could unquote the reference at expansion within the macro