RE: [racket-users] Distinct instantiations of modules

2015-08-07 Thread Jos Koot
Thanks for the suggestion, Jos _ From: Alexander D. Knauth [mailto:alexan...@knauth.org] Sent: jueves, 06 de agosto de 2015 16:55 To: Jos Koot Cc: Racket-Users List Subject: Re: [racket-users] Distinct instantiations of modules I think namespace-attach-module is one way to do

Re: [racket-users] Distinct instantiations of modules

2015-08-06 Thread Alexander D. Knauth
I think namespace-attach-module is one way to do this: #lang racket (module a racket (define ns (make-base-namespace)) (namespace-attach-module (current-namespace) 'racket/promise ns) (parameterize ((current-namespace ns)) (namespace-require 'racket)) (define *promise?

[racket-users] Distinct instantiations of modules

2015-08-01 Thread Jos Koot
Some (I think many) modules define struct types and provide the constructors and predicates of these structs. A predicate of an instance of such a module does not recognize a struct made by a distinct instance of the same module. For example: #lang racket (module a racket (define ns