From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Christopher Lam Newsgroups: gmane.lisp.guile.user Subject: Re: srfi-9 vs make-record-type Date: Mon, 26 Aug 2019 12:20:57 +0000 Message-ID: References: <87lfw78ohy.fsf@netris.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="31847"; mail-complaints-to="usenet@blaine.gmane.org" Cc: guile-user Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Mon Aug 26 14:22:08 2019 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1i2E0e-00086L-2d for guile-user@m.gmane.org; Mon, 26 Aug 2019 14:22:08 +0200 Original-Received: from localhost ([::1]:52412 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i2E0c-0001vD-Q4 for guile-user@m.gmane.org; Mon, 26 Aug 2019 08:22:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52865) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i2E00-0001se-1Y for guile-user@gnu.org; Mon, 26 Aug 2019 08:21:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i2Dzy-00069v-QS for guile-user@gnu.org; Mon, 26 Aug 2019 08:21:27 -0400 Original-Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]:40561) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i2Dzy-00069g-Jv for guile-user@gnu.org; Mon, 26 Aug 2019 08:21:26 -0400 Original-Received: by mail-ed1-x52f.google.com with SMTP id h8so26242407edv.7 for ; Mon, 26 Aug 2019 05:21:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:cc; bh=RLYRog3+qBN+TqwmnaJ2DH0s4BK4hAHHIa/f5Vl5hjQ=; b=jSmf8suzYLuMUZaNROJH5Hq+xsdeyIfVtlMjzNgG0JVvPRQa5vE3/shIZBoIn9Ymyo 88dm1AZwDYJBzfcbbrfHCYAt/ohR5y4G6KgiDpHOkRJQBxscgAj2zVq4daefLbpAL6rC sDIrtGHlQQv7QL5RtZr81swjrwKuWSb0VtH7anGcWzX9EzxSHrPEi/3cW0g0aqIvDMr1 mXzl/9eBpfzU81dg2cV6qsUKkGZKikRiC08D58nsKIQMeTtfmZtcxMfUChbnN8izq0Tw nh94avPUG2Yc4XLj8fbslXcicmFY2pbmPhUlH7iSLsdyC11hV6bL+m2sRhL1iVX5fFHO oCrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:cc; bh=RLYRog3+qBN+TqwmnaJ2DH0s4BK4hAHHIa/f5Vl5hjQ=; b=TPGEnyLMUeuTpq37bicW0T9+RYtn0/BgDztKxsMqs9Abm7H00Fj03BxLIbkEF9+xKR 2qdsLn5xZq2Es5fEGcMK/juFIQpRitlGEkUJE76FvOaXFx/OQ55Q09vTHdu6UDncLFqd 3tSMxeqTA7z9/sKOWYNG0U4JJQrALwuWy+JjzzhP+PuFVhZHsv6xL3OraF7LsdBEH0JW V67FGuIGD4acB/tQQjzJFeFbyLCkr8W+tfl3tAWi4UiTDMiU1t9yjDeDZ0vudLCBg7m2 q0hiWmwbvi1k9TYmW4fn0w/XwiSojwv9LmRYAgOh3OxWOH2bZDNHgM4TaNMx2f94CMiy Ru9g== X-Gm-Message-State: APjAAAXLVF03r+BLTTCtoILC1NZgSaxkGNER345oVyFLXX0CgETf+0UI VCPYtk21OTHa72XkqeQpUMQ+mahgDF29tr6BoZQJmb9hF7s= X-Google-Smtp-Source: APXvYqyBdeiv4efmOmtlSO8YZiOKPiz4CVhexytEKm7XUSQgY/lcrLtl1bYtPN3hiJUwGn2zmBn0i75Y3RGVH6l8zK8= X-Received: by 2002:a17:906:1484:: with SMTP id x4mr16390066ejc.204.1566822084423; Mon, 26 Aug 2019 05:21:24 -0700 (PDT) In-Reply-To: <87lfw78ohy.fsf@netris.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::52f X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.org gmane.lisp.guile.user:15685 Archived-At: Thank you Mark and John. On Mon, 5 Aug 2019 at 18:18, Mark H Weaver wrote: > The problem here is that 'make-person' is a macro. Macros are expanded > at compile time, and must therefore be available at compile time. > > When you compile 'm2.scm', those macros are not available, because > 'load' only has effects at run-time, by design. Since there is no macro > definition for 'make-person' at compile-time, Guile's compiler generates > code that assumes it will be a procedure. > > In summary, you cannot use 'load' to import macros from another module. > > > For various reasons I must keep (load "module.scm") mechanism > If you can share those reasons, perhaps I can help you find another > solution. > The only reason is that I've started cleaning up numerous modules in GnuCash written about 20 years ago, and the hyper-modular approach is too difficult to try unravel for now. So, I've converted records to srfi-9 wherever possible (i.e. used internally), and left the exported ones alone. This one was a fun one to fix: https://github.com/Gnucash/gnucash/commit/e3a695d0 ;-)