From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 2MssNKdyQGJNVwEAgWs5BA (envelope-from ) for ; Sun, 27 Mar 2022 16:20:23 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id CCHxMKdyQGI2+AAAauVa8A (envelope-from ) for ; Sun, 27 Mar 2022 16:20:23 +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 9EF08109C5 for ; Sun, 27 Mar 2022 16:20:23 +0200 (CEST) Received: from localhost ([::1]:60642 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nYTkk-0000vS-QJ for larch@yhetil.org; Sun, 27 Mar 2022 10:20:22 -0400 Received: from eggs.gnu.org ([209.51.188.92]:53314) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nYTkT-0000tn-8l for guix-devel@gnu.org; Sun, 27 Mar 2022 10:20:05 -0400 Received: from [2a02:1800:120:4::f00:14] (port=38098 helo=xavier.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 1nYTkR-0004Ea-EI for guix-devel@gnu.org; Sun, 27 Mar 2022 10:20:04 -0400 Received: from [172.20.10.23] ([188.188.29.207]) by xavier.telenet-ops.be with bizsmtp id BSKy270024U7BGC01SKyls; Sun, 27 Mar 2022 16:20:00 +0200 Message-ID: <27784f05f451edf27d16c718c853ecc8205af51b.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:19:57 +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="=-2mxlEQqNWhzenxfL+vUL" 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=1648390800; bh=95ATKgVSCD+iARklbZx75gAd5guvrDl11vaWgSFJ/qw=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=BBoFzvBvkZW85SCSF/jKvkymUNzTp02YOEpKq+FwCx6apEY9+qHxr3Hz40AeVWiZ/ 91wikKzQJNEzJqLpvGDiDmploQv8uHqCXfcGV3xlsl7oh5A+Z+YrQZKwQ8lp4HGfr2 p7gAv5OniXw1X0H1aNIspNvCLQIwI9chx8LDgVhL3z3EMW5dy3T7w04qFGmKcdobZs J+d0IBQrk5caZJpxa54F7XK3rZLf3OZvYLB63GIDZGi33Iz9V/pC45eM/ORFPjaWZl C7Rko+Tay0hWVrbPlB4+UP1eDCJKx25VyH+FCkhoXyuEe5AflBUPelMKLW40US0P5m cdTOpRerZyQ8g== X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a02:1800:120:4::f00:14 (failed) Received-SPF: pass client-ip=2a02:1800:120:4::f00:14; envelope-from=maximedevos@telenet.be; helo=xavier.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=1648390823; 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=95ATKgVSCD+iARklbZx75gAd5guvrDl11vaWgSFJ/qw=; b=DeiMq4Sui7xrNJ5Xz/DRXtX3wLMUdNctUSfXt8ifiwdiuGP4+rLcvT/2wsIRlfm+oE1YIU NNoHIDaSMbHq3li19WUiWXZ3rWH27tTKBzdHfe6lEDu5qrNJKKnTJxr8mbfEmxM7536xpu R3UkszSDWjybeaAlL8Gy2FWe3Vm7Uw4YNoatDIwZxD5gt7IZR+XIk34sW6sHATKTvikYWe sVzrdNMwRN8CqLSk0BJJrqj7LVVOVi/Too3iPcO8rdPL2WV3uzC++gWGvQMY1dGbU9yHDH IpvQ2oGkRqkQwTcoF2rRd3GvOsT4HxYCFeQL7WTc5f9UXQSw/U3NA4WBxsxH2w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1648390823; a=rsa-sha256; cv=none; b=XqUpyiboKnyVEUzTtxQFs7K4prs3NpD63F6J7sfRKxos/9cYhJB8RaOLMfVnSWisRm7EIv NaUt0mjrBPb1mPDnsG6TOFXeWIsHytVgpT+XPa+qKXcmLtE2nBDpR5lKcYhcoHAEVlOlHm dfNeDnErHKJmqgqS191Z29CfyeiWzC4SCst3b3Wrl7Jzp7+NHrU4h0PLoXq7XU5iyvAgeH LY4E3EY2i7w8m8g4xkd70X5woAFYPb2LELaXYK73PewmvvX3um2nQG4o5HrM6lxdLFy8Wq qs9IKU5YBFBbdK1Jo7soURyu1zOlWoYqoQzogxxgcPUAyUXYQEk9KmfhYzY29A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r22 header.b=BBoFzvBv; 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=BBoFzvBv; 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: 9EF08109C5 X-Spam-Score: 2.73 X-Migadu-Scanner: scn0.migadu.com X-TUID: SJ+chsDrKvoT --=-2mxlEQqNWhzenxfL+vUL Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Philip McGrath schreef op zo 27-03-2022 om 10:12 [-0400]: > Oh, wow. I definitely had not realized that, *even inside a > declarative=20 > module*, a reference to a variable with no statically visible > definition=20 > would semantically be a dynamic lookup in a mutable environment at=20 > runtime (rather than a compile-time error), though I do see now that=20 > `info guile declarative` does indeed say that marking a module as=20 > declarative "applies only to the subset of top-level definitions that > are themselves declarative: those that are defined within the=20 > compilation unit, and not assigned (=E2=80=98set!=E2=80=99) or redefined = within the=20 > compilation unit." >=20 > Does this mean that Guile treats all imported bindings as non- > declarative? > This seems like a big barrier to cross-module inlining, though IIUC > Guile > currently doesn't do much of that by default (maybe for this reason). To my understanding, declarative modules are orthogonal to circular imports. All declarative modules do, is telling the Guile compiler that =E2=80=98yes, inlining is fine, I won't change the value of these top- level variables=E2=80=99. Declarativity does not change the module variable lookup system and module loading system, it only changes the set of optimisations. Greetings, Maxime. --=-2mxlEQqNWhzenxfL+vUL 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+4iGRcl7gUCYkByjRccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7svWAQDu0a0nsnSuV4NXabkn8DFQR9Ma q5cK5JJ4ht5Hz24/1wD+KkuBd9eta9kcjyMwu5YoHjGPpZqmdnj+Tbp7cMQrzQQ= =30nS -----END PGP SIGNATURE----- --=-2mxlEQqNWhzenxfL+vUL--