From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.devel Subject: Re: master 0cbcc62: 'assoc' is not side-effect-free; constprop its pure subset Date: Sun, 1 Nov 2020 13:56:50 +0100 Message-ID: <823589BC-6CB4-4140-A442-10B5FF5870AC@acm.org> References: <20201031133156.28415.87445@vcs0.savannah.gnu.org> <20201031133158.04C1220A1C@vcs0.savannah.gnu.org> Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.17\)) 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="28789"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Stefan Monnier , emacs-devel@gnu.org To: Andrea Corallo Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Nov 01 13:58:51 2020 Return-path: Envelope-to: ged-emacs-devel@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 1kZCwc-0007QV-Ny for ged-emacs-devel@m.gmane-mx.org; Sun, 01 Nov 2020 13:58:50 +0100 Original-Received: from localhost ([::1]:41868 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kZCwb-000514-Qx for ged-emacs-devel@m.gmane-mx.org; Sun, 01 Nov 2020 07:58:49 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56934) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kZCus-0003h3-4H for emacs-devel@gnu.org; Sun, 01 Nov 2020 07:57:04 -0500 Original-Received: from mail1464c50.megamailservers.eu ([91.136.14.64]:57728 helo=mail268c50.megamailservers.eu) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kZCup-0006Ch-1C for emacs-devel@gnu.org; Sun, 01 Nov 2020 07:57:01 -0500 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1604235415; bh=PzQbBXIUUVQUm06ggBEAqPsPWxJKO5ze86E5iAWXn4U=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=TE1+zHxUD4rhWqNwP6dWmN0kucyQTZCyHTY6SYLRv/T3R3jxMR0mkZpbqNiKA4wMH vJbiLnmceD6fIF4W3FGBkMJ1D5HxGNMn6gJg+rcfQfK1oW1b0Ko38+jqKpwSPHlHgA 2kXC+6CTQPJZSsIQsTrR+gvx6w65rQwCKC5/3ziQ= Feedback-ID: mattiase@acm.or Original-Received: from [192.168.0.4] (c188-150-171-71.bredband.comhem.se [188.150.171.71]) (authenticated bits=0) by mail268c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 0A1Cuppd032193; Sun, 1 Nov 2020 12:56:53 +0000 In-Reply-To: X-Mailer: Apple Mail (2.3445.104.17) X-CTCH-RefID: str=0001.0A782F23.5F9EB097.0049, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=BZ+mLYl2 c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=IkcTkHD0fZMA:10 a=M51BFTxLslgA:10 a=mDV3o1hIAAAA:8 a=ydYx7chbuJ8vSwxFpyQA:9 a=QEXdDO2ut3YA:10 a=_FVE-zBwftR9WsbkzFJk:22 X-Origin-Country: SE Received-SPF: softfail client-ip=91.136.14.64; envelope-from=mattiase@acm.org; helo=mail268c50.megamailservers.eu X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/01 07:56:56 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x (no timestamps) [generic] X-Spam_score_int: -11 X-Spam_score: -1.2 X-Spam_bar: - X-Spam_report: (-1.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, SPF_HELO_NONE=0.001, SPF_SOFTFAIL=0.665 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:258598 Archived-At: 1 nov. 2020 kl. 10.47 skrev Andrea Corallo via Emacs development = discussions. : > just ot mention, would be nice if we design this to be accessible so = we > can use it in the native compiler as well maintaining it just in one > place. It wasn't really meant seriously, but a simple system may look like EFFECT ::=3D nil ; no effect (subset of all effects) | * ; any effect (superset of all effects) | signal ; signal any condition (error etc) | read-env ; read from the global environment | N ; effect of function passed as argument N, N=E2=89=A51 | (union EFFECT...) ; union of effects Then today's declarations correspond to the effects: pure ~ signal side-effect-free ~ (union signal read-env) error-free ~ read-env and the effects of 'assoc' would be (union signal 3). More fine-grained effects could be added, such as throws, mutation of = arguments, reading data referenced by arguments, etc. It all depends on what is useful for the compiler(s) and related tools.