unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* (unknown)
@ 2023-08-01  9:53 Damien Mattei
  2023-08-01  9:59 ` Jean Abou Samra
  2023-08-01 10:57 ` message without subject Zelphir Kaltstahl
  0 siblings, 2 replies; 10+ messages in thread
From: Damien Mattei @ 2023-08-01  9:53 UTC (permalink / raw)
  To: guile-user

hello,

i have this error:

ice-9/boot-9.scm:1685:16: In procedure raise-exception:
Throw to key `match-error' with args `("match" "no matching pattern" (1 0))'.

i thought it was a 'match' related error as i used it in a macro:

;;(display "before match") (newline)
       (match (list index1-or-keyword-eval-pos index2-or-keyword-eval-pos)

          ;;  {a <+ (make-vector 7 0)}
          ;; '#(0 0 0 0 0 0 0)
          ;; > {a[/ /] <- #(1 2 3)}
          ;; > a
          ;; '#(1 2 3 0 0 0 0)
          (((? (cut equal? <> /)) (? (cut equal? <> /)))
(container-copy! container-eval
                                          0
                                          expr-eval))

          ;;  {s <+ (string-append "abcdefgh")}
          ;; "abcdefgh"
          ;; > {s[3 /] <- "zob"}
          ;; > s
          ;; "abczobgh"
          ;; >
          ((i1 (? (cut equal? <> /))) (container-copy! container-eval
                          i1
                          expr-eval))

          (((? (cut equal? <> /)) i2) (container-copy! container-eval
                               0
                               expr-eval
                               0
                               i2))

          ((i1 i2)  (if (vector? container-eval)  ;; normal case
                 (function-array-n-dim-set! container-eval expr-eval
(reverse (list i1 i2)))
                 (array-set! container-eval index1-or-keyword-eval
index2-or-keyword-eval expr-eval)))) ;; end match

if really the given args are (0 1) i suppose the last case of match
should be evaluated?

why not?

quoting the whole part of the macro and i still have the issue
this seems to prove the problem is in other part of my code but match
is only used here???

so i do not understand

i search on the net and only find relating issues with guix ,which i do not use:

https://www.youtube.com/watch?v=sqYGI5Ow2wY

i probably missed something cross-developping between my code in guile
and racket as the 'match' are not compatible but i'm sticked with this
problem for hours... any idea??? if i use old code i suppose it will
work (i have older version)

Damien



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-08-02  6:52 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-01  9:53 (unknown) Damien Mattei
2023-08-01  9:59 ` Jean Abou Samra
2023-08-01 10:46   ` Re: Damien Mattei
2023-08-01 11:46     ` Re: Jean Abou Samra
2023-08-01 14:28       ` match error Damien Mattei
2023-08-01 17:32         ` Damien Mattei
2023-08-01 21:16           ` Jean Abou Samra
2023-08-02  6:52             ` Damien Mattei
2023-08-01 10:57 ` message without subject Zelphir Kaltstahl
2023-08-01 13:46   ` match error Damien Mattei

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).