From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Thompson, David" Newsgroups: gmane.lisp.guile.user Subject: Re: Setting variables in declarative modules Date: Fri, 1 Nov 2024 09:20:02 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38259"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Guile User To: =?UTF-8?B?VG9tbWkgSMO2eW7DpGzDpG5tYWE=?= Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Fri Nov 01 14:21:03 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 1t6raI-0009jx-AV for guile-user@m.gmane-mx.org; Fri, 01 Nov 2024 14:21:02 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t6rZb-0006jn-Dr; Fri, 01 Nov 2024 09:20:19 -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 1t6rZZ-0006jX-DU for guile-user@gnu.org; Fri, 01 Nov 2024 09:20:17 -0400 Original-Received: from mail-qt1-x82d.google.com ([2607:f8b0:4864:20::82d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t6rZW-0006De-7I for guile-user@gnu.org; Fri, 01 Nov 2024 09:20:17 -0400 Original-Received: by mail-qt1-x82d.google.com with SMTP id d75a77b69052e-4608da1bea5so16839351cf.1 for ; Fri, 01 Nov 2024 06:20:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=worcester.edu; s=google; t=1730467213; x=1731072013; darn=gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=23Np9E1vaKgqCR9MaimE0I57xdN8XzRPH+HSKv81NFs=; b=Ab0q4UMecr59IqlC8qPkSqbMAH7pRXsFFwScuVpz+fK9ubgD9GsUgZyx34VM43ogRb DdvCXZhp4X4DwrcOzQTYeEhRIa8jmeOh0IDXy0Xh2ItQH9O+aXNgnDKYaP/ieQXEwjXi Uj7YKvBs0kxO9kYzVXOk83rnaXPWLvDwGY4mo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730467213; x=1731072013; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=23Np9E1vaKgqCR9MaimE0I57xdN8XzRPH+HSKv81NFs=; b=ht9Ma3hg6il+D7qS5OqxE5yjEQ5M7pQzqZpTBlbxo8MCdQp9K53FkaGxmArheeVTqA ijcMEQgAC2ziRNCiQsbxRcTr1TZ/jKtUMKSKptlJa9XMkkE7qZuMGBAtAyobBLAKPClJ KBudPkqC3oFVAoKSYJKagzOARsUMzFF7z/mdt64UBeF2O0CAFJTkfK6QO4CtSAbM4JsV FJ2G5ffxBdDQWRUxR9ZqORAsguH2VcGMmDFIlIsp5u/nQVJU/Ma9D1WVMLl3UETekJw8 gk+AX9ohpfPv8bz10dOEwgi3ADFuPm9QPs9wEw4mgNhjYcZMfeyF7DVECE+HKf6uHFGE UoCA== X-Gm-Message-State: AOJu0YzUcEXgJ0u/Q5OpAhT2LO7B6JtnR5BYz9NngAAAoLSv/gwAyvTc W3FpAHtFz1LCz/AFTwfI4wV1XLSkyXk2MVP4SI/aFwK6PHKIqq3psFdLSEzh5ilvAp9yi4Yb33/ AwAD8PAazdKjuPSRuAiS4cNy4zSWsCBeqL1ZxQGYqGuRaN2Ne X-Google-Smtp-Source: AGHT+IEp342L5gaoI1Z+ylGOsuGQ55BzUSyqVE9KcsPxFbsWMohRLSfqy6ZV3PsAN63uQlsZEH/z0ISWDAykmZKaUkU= X-Received: by 2002:ac8:690d:0:b0:45f:bca0:b8d2 with SMTP id d75a77b69052e-4613c015ccbmr392701141cf.20.1730467212551; Fri, 01 Nov 2024 06:20:12 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::82d; envelope-from=dthompson2@worcester.edu; helo=mail-qt1-x82d.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, 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:19862 Archived-At: Hi Tommi, On Thu, Oct 31, 2024 at 10:30=E2=80=AFPM Tommi H=C3=B6yn=C3=A4l=C3=A4nmaa wrote: > > Suppose that I have the following code in a Guile module: > --- > (define fw-proc #f) > > (define (my-proc x) > (display (fw-proc x))) > > (define (fw-proc x) > (cons x x)) > --- > > Can I declare the module as declarative? Yes, this is fine. If you put this in a module file and compile it, Guile does not issue any warnings. `define` is not `set!`. (Modules are declarative by default, btw.) - Dave