unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* [bug #30116] (guile) introduces a cycle in the submodules subtree
@ 2010-06-11 15:31 Jose Antonio Ortega Ruiz
  2010-06-14  9:56 ` Andy Wingo
  0 siblings, 1 reply; 3+ messages in thread
From: Jose Antonio Ortega Ruiz @ 2010-06-11 15:31 UTC (permalink / raw)
  To: Jose Antonio Ortega Ruiz, bug-guile


URL:
  <http://savannah.gnu.org/bugs/?30116>

                 Summary: (guile) introduces a cycle in the submodules
subtree
                 Project: Guile
            Submitted by: jao
            Submitted on: Fri 11 Jun 2010 03:31:13 PM GMT
                Category: None
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

Define the auxiliary procedure:

   (define (submodules m) 
     (hash-map->list list (module-submodules m)))

which just extracts a list of submodules of `m'. Now apply it to the '(guile)
module:

   (define gm (resolve-module '(guile) #f))

   (submodules m)

this evaluates to a duplicate submodule with different names:

   ((%app #<module (%app) 84e7c60>) (app #<module (%app) 84e7c60>))

Asking for the submodules of either one of those gives:

   (define (submodules* m) (cdr (submodules m)))
   (submodules* (car (submodules* m)) => (#<module () 84e7ea0>)

and getting the submodules of this last one, one obtains the list of top
level modules, which again includes `gm'. That means that the module tree
isn't actually a tree, but a DAG, which sounds weird to me (and will most
probably provoke infinite loops in module folders).

Also, the duplicated submodule of '(guile) seems an implementation detail
accidentally leaked (hiding it would break the cycle).

   
   
   




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?30116>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




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

end of thread, other threads:[~2010-06-14  9:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-11 15:31 [bug #30116] (guile) introduces a cycle in the submodules subtree Jose Antonio Ortega Ruiz
2010-06-14  9:56 ` Andy Wingo
2010-06-14  9:56   ` Andy Wingo

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).