unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Damien Mattei <damien.mattei@gmail.com>
To: guile-user <guile-user@gnu.org>
Subject: (unknown)
Date: Tue, 1 Aug 2023 11:53:30 +0200	[thread overview]
Message-ID: <CADEOadd-jPDvJCwJj7LrTmvNtw18OGVGqpanLOYw2v5nAMX3QA@mail.gmail.com> (raw)

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



             reply	other threads:[~2023-08-01  9:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-01  9:53 Damien Mattei [this message]
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
  -- strict thread matches above, loose matches on Subject: below --
2013-12-30  2:58 (unknown) Eduardo Acuña

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CADEOadd-jPDvJCwJj7LrTmvNtw18OGVGqpanLOYw2v5nAMX3QA@mail.gmail.com \
    --to=damien.mattei@gmail.com \
    --cc=guile-user@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).