guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sxml-match example from manual fails


From: Ludovic Courtès
Subject: Re: sxml-match example from manual fails
Date: Tue, 12 Jun 2012 17:53:06 +0200
User-agent: Gnus/5.130005 (Ma Gnus v0.5) Emacs/24.1 (gnu/linux)

Hi,

Aidan Gauland <address@hidden> skribis:

> But guile doesn't seem to like it:
> $ guile
> GNU Guile 2.0.5-deb+1-3
> [...]
> scheme@(guile-user)> (sxml-match '(e (@ (i 1)) 3 4 5) [(e (@ (i ,d)) ,a
> ,b ,c) (list d a b c)] [,otherwise #f])
> While compiling expression:
> ERROR: Syntax error:
> unknown file:1:0: source expression failed to match any pattern in form
> (@ (i (unquote d)))

You need to import the module first:

  scheme@(guile-user)> (use-modules(sxml match))
  scheme@(guile-user)>      (sxml-match '(e (@ (i 1)) 3 4 5)
         [(e (@ (i ,d)) ,a ,b ,c) (list d a b c)]
         [,otherwise #f])
  $2 = (1 3 4 5)

Thanks,
Ludo’.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]