guile-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] primitive resolution for public refs


From: Ludovic Courtès
Subject: Re: [PATCH] primitive resolution for public refs
Date: Fri, 16 Mar 2012 12:22:36 +0100
User-agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.93 (gnu/linux)

Hi BT,

BT Templeton <address@hidden> 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’.




reply via email to

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