From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?B?VG9tbWkgSMO2eW7DpGzDpG5tYWE=?= Newsgroups: gmane.lisp.guile.user Subject: Global variables and declarative modules Date: Fri, 1 Nov 2024 17:22:19 +0200 Message-ID: <1c0fb694-bd70-59fc-aaca-c252fdbdd918@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32111"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.14.0 To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Fri Nov 01 16:23:05 2024 Return-path: Envelope-to: guile-user@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1t6tUO-00089J-VO for guile-user@m.gmane-mx.org; Fri, 01 Nov 2024 16:23:04 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t6tTt-0007J1-El; Fri, 01 Nov 2024 11:22:33 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t6tTp-0007IY-2O for guile-user@gnu.org; Fri, 01 Nov 2024 11:22:29 -0400 Original-Received: from mail-lf1-x132.google.com ([2a00:1450:4864:20::132]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t6tTm-0002UQ-TB for guile-user@gnu.org; Fri, 01 Nov 2024 11:22:28 -0400 Original-Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-539e13375d3so2284868e87.3 for ; Fri, 01 Nov 2024 08:22:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730474544; x=1731079344; darn=gnu.org; h=content-transfer-encoding:subject:from:to:content-language :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=7s78nZmyI6hnC9qub0nzOqQoWLBcHT17jYWMqpZrkgE=; b=RHkdfPuKY8epujEQPcXWVytD8hiVb1ig+ffMXkYC9zoubNwVs06eptGb+FiAK8Owgl vTukOXfYKnBgnlyedlpY2jTYmw/dEePLMWpEA8fuZIpGxQC1B4mWD+nGo8dGoHBYy3z/ RPfG0uechpnCAVHNmDBGLn9zI8Gl5NaqC+Kj8/bPAyGLvo037VPWhVYIo3eyx018iutQ fOR2M7276t0/ayzqgHc9fBMmMljpatkSOC8/vJIfU7zjBDN/ow7iQzuQZrjHyf8ZyP45 n1w41J9MRwmeeUfp0rvLUCpDYSftH7lSSKBFzNM5grZcUlHmRmwig6H11/HQAtyU+rAl DDTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730474544; x=1731079344; h=content-transfer-encoding:subject:from:to:content-language :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=7s78nZmyI6hnC9qub0nzOqQoWLBcHT17jYWMqpZrkgE=; b=EITZJPs+kcc0e6r2skUGSvOo6+vi5ihDxm5iMNC/Tzq2bKAA/TyZCRm13GXgUcNMv1 7mgR9WJ1qiAuBFQ8Nd55aERtBFjoBL0Bq1Q0TPV2pilAQ9wZAHf3wKDWk2Er3TB1rl71 iDtiBsQGUKg6Ec8RgHfmusdV/Uz6Txz7JdJXXRS5dTRhIUh/WWOezyCnxEY4JrVNhyAo iiHFPb8kPgSDyLvbqjeikk0iyDCu+yFv8sZiJDIpg/ln7i6Ywo/AATMS/S+pkMYkOTsc yab12VIAA+eca6wC4QPVHZspt5ko1TiYtTBb8f7PU82mcsDXHzip7/t0x/K+YvFL8nbv +Jng== X-Gm-Message-State: AOJu0YxXCdmKKPRBesYPTgmNLTJ31xPDksNT1FeXsRZGswyfLPIjw9Ju DEi4hqZxEzom8t13AQQ2cLO166oH+xDiBH9ThNFbKjt0Hd2SRavNaZdl X-Google-Smtp-Source: AGHT+IHxPiBQo7H2/CZ2/gqOs+xeHo3SZaUxjLkc9UGo6Fs1CwRoEnjvvJRLBy80IJ8AX2dYcTXjYQ== X-Received: by 2002:a05:6512:ac3:b0:536:56d8:24b4 with SMTP id 2adb3069b0e04-53c79e15746mr4126114e87.5.1730474543983; Fri, 01 Nov 2024 08:22:23 -0700 (PDT) Original-Received: from [192.168.21.68] (mobile-access-6df049-195.dhcp.inet.fi. [109.240.73.195]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-53c7bdec14bsm586232e87.308.2024.11.01.08.22.20 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 01 Nov 2024 08:22:22 -0700 (PDT) Content-Language: en-US Received-SPF: pass client-ip=2a00:1450:4864:20::132; envelope-from=tommi.hoynalanmaa@gmail.com; helo=mail-lf1-x132.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.user:19868 Archived-At: Suppose we have module a that defines a global variable: --- (define-module (a)) (export my-global-var) (define my-global-var #f) --- and module b that uses the global variable and changes it: --- (define-module (b)) (use-modules (a)) (define (my-proc)     (set! my-global-var 100)     (display my-global-variable)) --- Is it so that module a can't be marked declarative?      - Tommi Höynälänmaa -- Kotisivu / Homepage: http://www.iki.fi/tohoyn/ Sähköposti / E-Mail: tommi.hoynalanmaa@iki.fi GPG-sormenjälki / GPG fingerprint: 55F4 2477 7155 3528 5CB2 2B7A BB86 1FDE 4046 0F83 FT, Debian-ylläpitäjä / PhD, Debian Maintainer