unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: guile-devel@gnu.org
Subject: Re: [PATCH] primitive resolution for public refs
Date: Fri, 16 Mar 2012 12:22:36 +0100	[thread overview]
Message-ID: <87obrwx01v.fsf@gnu.org> (raw)
In-Reply-To: 87haxt3h53.fsf@olor.terpri.org

Hi BT,

BT Templeton <bpt@hcoop.net> skribis:

> * module/language/tree-il/primitives.scm (resolve-primitives!): Resolve
>   public module-refs to primitives.

What about resolving private module-refs too?  Here’s the motivation:

  scheme@(guile-user)> (use-modules(ice-9 match))
  scheme@(guile-user)> ,expand (match x ((_ ...) #t))
  $4 = (let ((v-356 x))
    (let ((failure-360
            (lambda ()
              ((@@ (ice-9 match) error)
               'match
               "no matching pattern"))))
      (let ((_-414 v-356))
        (if ((@@ (ice-9 match) list?) _-414)   ;;; <-- here
          #t
          (failure-360)))))

Also, here’s a test case for you to add in tree-il.test:  ;-)

  (pass-if-peval resolve-primitives
    ;; Module-refs that resolve to primitives are opened.
    (apply (@@ (guile) car) (const (1 2)))
    (const 1))

Could you provide an updated patch?

Ludo’.




  parent reply	other threads:[~2012-03-16 11:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-12 16:42 [PATCH] primitive resolution for public refs BT Templeton
2012-03-12 17:17 ` Noah Lavine
2012-03-12 18:03   ` BT Templeton
2012-03-12 19:42     ` Noah Lavine
2012-03-12 21:05       ` BT Templeton
2012-03-16 11:22 ` Ludovic Courtès [this message]
2012-03-16 19:38   ` BT Templeton
2012-03-21 21:58     ` Ludovic Courtès
2012-04-09 21:16       ` BT Templeton

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=87obrwx01v.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guile-devel@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).