From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id d1OhDexzQGJSZwEAgWs5BA (envelope-from ) for ; Sun, 27 Mar 2022 16:25:48 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id oAdyCexzQGJyXQAAauVa8A (envelope-from ) for ; Sun, 27 Mar 2022 16:25:48 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id BB8B8A5DA for ; Sun, 27 Mar 2022 16:25:47 +0200 (CEST) Received: from localhost ([::1]:36486 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nYTpy-00042H-Et for larch@yhetil.org; Sun, 27 Mar 2022 10:25:46 -0400 Received: from eggs.gnu.org ([209.51.188.92]:53980) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nYTp8-0003wx-GX for guix-devel@gnu.org; Sun, 27 Mar 2022 10:25:00 -0400 Received: from [2a02:1800:120:4::f00:13] (port=52596 helo=baptiste.telenet-ops.be) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nYTp3-0004wy-Mf for guix-devel@gnu.org; Sun, 27 Mar 2022 10:24:51 -0400 Received: from [172.20.10.23] ([188.188.29.207]) by baptiste.telenet-ops.be with bizsmtp id BSQm2700D4U7BGC01SQnwd; Sun, 27 Mar 2022 16:24:47 +0200 Message-ID: <667bc01515fa1b7678cf0bc14793fb7827bd0744.camel@telenet.be> Subject: Re: Semantics of circular imports From: Maxime Devos To: Philip McGrath , Ekaitz Zarraga , Ricardo Wurmus , guix-devel@gnu.org Date: Sun, 27 Mar 2022 16:24:46 +0200 In-Reply-To: <3493949.dX3coAEF3O@bastet> References: <2067ba1e606855eace261fd0b0ae9721b369bbd5.camel@telenet.be> <753ba5897ed397b5e95175cd139137975245945b.camel@telenet.be> <6012789.Rgyoke53jH@bastet> <3493949.dX3coAEF3O@bastet> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-Z08BsP341AE8AlWNUQ62" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1648391087; bh=Nn4VVLzxImHG1pg/Tfxb+dk24Jz4hMON9mm5FBbg9TQ=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=KkTLAq+pJztCRKZH44gG8aVzsx/05OuDBqgQn+n8SI32H6KkbvpFSL+KrDxMvFLpY hhHu7YClMSmWaWk0SGcMHG0it9omprcu4dorBRQQ33U9JoIdhpYPIuh99wPzALouJl Z2wuo9aTrV6w0WHo/7xQRmew/fudokqk8G0jgNZGwecV7Pk9JD7WO5MYbNGp1mPVEI wXAwP6gLGOdoFnvVoZWIaQi+R4te+Dl8wd97n8HVLTjsVK7i7pg3tugtCsAu4mcz/I ygYtzxC2XYBb6Kl+FnsvsdT2kMgmx0cuE1SpbzXUFEfVXXX7ejl1I2kA8Edg9BV8pO APS6FOvRoUB5Q== X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a02:1800:120:4::f00:13 (failed) Received-SPF: pass client-ip=2a02:1800:120:4::f00:13; envelope-from=maximedevos@telenet.be; helo=baptiste.telenet-ops.be X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 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_LOW=-0.7, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Liliana Marie Prikler Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1648391147; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=Nn4VVLzxImHG1pg/Tfxb+dk24Jz4hMON9mm5FBbg9TQ=; b=ZURXPAkmb4qgzVL+05OFX8Xvtcs7W4NpY1BDRtlkRRWCuNIYyHhbpjshOrJCLoPWrO6byc crIxfGCO0PhCiWp/zGRSNcodbu+y23ciC4bexZedhzNmhMrKjhGk4SAcCAlDfIKM0Amfzh YOxrRKmoMtFV/L618y2fcA3/OcO9p01T5jqTgTQenhm8UlhGLyyRW4u+I3ChCavXUODmjf VZVuOwv3ID8XDUxk6UbSysn5juDEUkp3dutlCQP2KzvyOo8+KA5gGKEP+hXCZp7KaJamsM qmTWv4XUPaf5JdtfwLmeU6e3hJg+ScVYszhEdNk1BcEhJVubokyIGJmry4ELoQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1648391147; a=rsa-sha256; cv=none; b=ZOoxgv9VoFqFU+fF+vjTF6KMsV2Boy17QPgYPStmqdgDsFu1brizwOMw4Sa0C/a8FME7ka nZvpWEHdNTMe6g7W8f3CGT89CVpI1jfNm7u9cOAGw+tsTXNNjYRshh1lAP5IxYo5e8X2rq kSRlzEu3tRbz7Oo01iUgi0M7lbgts4is3RCbtn/59+tCfj0Z/P+nJQWg3tY8JCldkbKTxe 4xQOg7dpMZ/Bhv47zM2w0FEZ2s9FCKO7ISaNOKY1AKse+hiA5wiAo4hPPaXFfmZxr8yVHa lzYfNoDbjSXPPYeubxM0aUV+xKP40vM1o0xiBkOO2R0IyBQ5NChwOmIYwezucg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r22 header.b=KkTLAq+p; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 2.73 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r22 header.b=KkTLAq+p; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: BB8B8A5DA X-Spam-Score: 2.73 X-Migadu-Scanner: scn0.migadu.com X-TUID: zo4ryZKHHH2y --=-Z08BsP341AE8AlWNUQ62 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Philip McGrath schreef op zo 27-03-2022 om 10:12 [-0400]: > The use of "top-level" to refer to definitions within a module is=20 > somewhat confusing to me. I usually understand "top-level" to refer > to=20 > the kind of interactive REPL environment for which R6RS leaves the=20 > semantics unspecified. Racket uses "module-level variable"=C2=A0 and > "module=20 > context" in contrast to "top-level variable" and "top-level context" > to > make this distinction.[1][2][3] (There are also R6RS "top-level=20 > programs", but I wouldn't think of those unless made very clear from=20 > context.) In Guile, if you start a REPL, the REPL is inside some module. By default, this module is the (guile-user) module (or (guix-user), when using "guix repl"), although this can be changed with ',m' and maybe by stepping through the debugger (not sure). As such, if you run (define foo 'bar) inside a REPL currently in (guile-user), then this corresponds to defining a top-level variable/module variable inside the (guile-user) module. Summarised: REPL environments have a corresponding Guile module and in Guile, there is no meaningful distinction between "top-level variable" and "module variable", unlike in Racket. Greetings, Maxime. --=-Z08BsP341AE8AlWNUQ62 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYkBzrhccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7pwGAP40YvOxZvluODFubO/t01POe091 j5hHEfKCjTf1L4SVvgD9GhG21p1BQyqDA6CWFC73XT6jJ2o5HOG+f/IZ3ujFGgQ= =GNWh -----END PGP SIGNATURE----- --=-Z08BsP341AE8AlWNUQ62--