From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.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 +DO0AfBoC2LOlgAAgWs5BA (envelope-from ) for ; Tue, 15 Feb 2022 09:48:48 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id EFcrNu9oC2IKdAEAG6o9tA (envelope-from ) for ; Tue, 15 Feb 2022 09:48:47 +0100 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 8E00120D61 for ; Tue, 15 Feb 2022 09:48:47 +0100 (CET) Received: from localhost ([::1]:55596 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nJtVt-0001Du-Oj for larch@yhetil.org; Tue, 15 Feb 2022 03:48:45 -0500 Received: from eggs.gnu.org ([209.51.188.92]:43476) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nJtVZ-0001D5-SB for guix-devel@gnu.org; Tue, 15 Feb 2022 03:48:25 -0500 Received: from [2a02:1800:120:4::f00:15] (port=51558 helo=andre.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 1nJtVX-0001C0-QR for guix-devel@gnu.org; Tue, 15 Feb 2022 03:48:25 -0500 Received: from ptr-bvsjgyhxw7psv60dyze.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a]) by andre.telenet-ops.be with bizsmtp id vLoK2600D4UW6Th01LoKA0; Tue, 15 Feb 2022 09:48:21 +0100 Message-ID: <0219970eaf57c70b39ad527cefe3c74dda425cf5.camel@telenet.be> Subject: Re: better error messages through assertions From: Maxime Devos To: Ricardo Wurmus , guix-devel@gnu.org Date: Tue, 15 Feb 2022 09:48:19 +0100 In-Reply-To: <87ilthoxvu.fsf@elephly.net> References: <87ilthoxvu.fsf@elephly.net> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-t7pAGMEP8RcBs01Z/9ri" 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=1644914901; bh=Hy6O63cbzEkxXo2+LNPA4Z4PphNZXfsNBiIuaABvLBs=; h=Subject:From:To:Date:In-Reply-To:References; b=Xo71PzbW2qe07UoS1zvADgXiDr5zpcyvxNI6oLpmaX/wHrji+YXF/6Ueg48zCld1u f/bzEW6VPqc9mMWQcv41VSNda8ERppU/Qxo0+vC1U/aEg6QlaqWT5nPXu3BcrJRWoI 1wsNJTFczm9EaqPcaiSN5OpW0BMaCKnW4xdaa5azsrk7j26EXVsY9LJebOw1x22zpx o/KQOe+6yVqLrRMUElG7gXBvZKJBR0dL1MJdc3BYhUYAclXzWFpWX3PW7lONO0jhmM Fxk6dJ0U8rdWI6xaQwsqwOlnQfPe3CuSvb3XbQ1uxvr4W8xriAw2wlmVfXqs1Xo2O4 7ANezMR2UVKJg== X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a02:1800:120:4::f00:15 (failed) Received-SPF: pass client-ip=2a02:1800:120:4::f00:15; envelope-from=maximedevos@telenet.be; helo=andre.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: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1644914927; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=Hy6O63cbzEkxXo2+LNPA4Z4PphNZXfsNBiIuaABvLBs=; b=gDLZpAw/wCGdPWxNU8zGHiuacFwuTKQpE8NUVRFkZpkgPDI1PmeIvqlZJlmROhOKclFdTJ qwGKLb//39qRy+TGHvi2i+7wBuQd2ogIcjcFMWa9R2ee89dKQewgYf+X9dAvYODNvQPDeh A/4UA98TYs/2b9WzV2mxZ57jZLIEbxWygneOvCcg1hwIsPoJ5aLd1vcBrqTpVbWuT6LucS z6qaQZWkVmqJwdfya+Hpw6V2ZWX0DBFhGHODqnTIpyevtqV/1bQkg16XfO8cZXe0a6ho2v 6qctCdgsy5WYfwHIrNwHfJYekaltsJIUWUtnK4OWqvScSoDm+8c0vkjtkkxwsA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1644914927; a=rsa-sha256; cv=none; b=gPfwzmDl0SZxDEta0kniNPH+GGpvORxN55dFqxAc2bTPrBX0B0eZ70wshUHrCp+xsfg3EP tnAhzt9hbxi891KUH+i+0vw5AGX5xC/dAgawVnoo9m4dbznw0sVlYgR8RCyXFPEAjokzOD omcFJbZhogwElWI8j7YxS2o7L+11F8RMt4DK4yLf0nbj7F5/FZgJdAWOouvHwMa1W4Afbs zCc7lO5CN2G2BMBLZfiAxiMElo/XXlYI/Xhm2OQQ337qVqlTh0WIPTCyvSK8/Lhu1vQPPm z2Clw9Jny9uK8LyRWWmmehr79u+yXj5NghoJpr2tBI4Abn4DefFAPRddqrJcdQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=telenet.be header.s=r22 header.b=Xo71PzbW; dmarc=pass (policy=none) header.from=telenet.be; 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: -6.53 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=telenet.be header.s=r22 header.b=Xo71PzbW; dmarc=pass (policy=none) header.from=telenet.be; 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: 8E00120D61 X-Spam-Score: -6.53 X-Migadu-Scanner: scn1.migadu.com X-TUID: T1JuH7rQ+ioQ --=-t7pAGMEP8RcBs01Z/9ri Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Ricardo Wurmus schreef op ma 14-02-2022 om 23:32 [+0100]: > I think we should add simple type checks, something like this: > [...] >=20 > What do you think?=C2=A0 There are many different ways of implementing th= is > (a new variant of DEFINE that also accepts a type declaration, an assert > like above, a fancier assert that composes a helpful error message by > itself, a separate type declaration that is looked up only when the > corresponding procedure is called in a certain context, etc), but I=E2=80= =99d > first like to know if there is consensus that we want something like > this. Seems nice. Greetings, Maxime. --=-t7pAGMEP8RcBs01Z/9ri 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+4iGRcl7gUCYgto0xccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7mvfAP0e615nLLXyNoh5iUCPs1vdVbxG uVmEalMoFDN53/zbswD/cjTOff07mkzLu6znXcZDVLQaxLavlTBKvGW4Z81s9AA= =Uwq8 -----END PGP SIGNATURE----- --=-t7pAGMEP8RcBs01Z/9ri--