unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Zelphir Kaltstahl <zelphirkaltstahl@posteo.de>
To: Damien Mattei <damien.mattei@gmail.com>
Cc: guile-user <guile-user@gnu.org>
Subject: Re: message without subject
Date: Tue,  1 Aug 2023 10:57:22 +0000	[thread overview]
Message-ID: <a36b3431-6751-6cdd-afa0-d495733cb7eb@posteo.de> (raw)
In-Reply-To: <CADEOadd-jPDvJCwJj7LrTmvNtw18OGVGqpanLOYw2v5nAMX3QA@mail.gmail.com>

On 8/1/23 11:53, Damien Mattei wrote:
> 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

Hello Damien (or responding ones)!

It would be good to have a proper subject in your message to the mailing list, 
so that one can see what your e-mail is about, without having to read 
everything. : ) Also good for later searching messages to the mailing list, when 
remembering there being some discussion and wanting to read up on it again.

Best regards,
Zelphir

-- 
repositories: https://notabug.org/ZelphirKaltstahl




  parent reply	other threads:[~2023-08-01 10:57 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Zelphir Kaltstahl [this message]
2023-08-01 13:46   ` Damien Mattei

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=a36b3431-6751-6cdd-afa0-d495733cb7eb@posteo.de \
    --to=zelphirkaltstahl@posteo.de \
    --cc=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).