From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id AFUiM4IHTmdPfgAA62LTzQ:P1 (envelope-from ) for ; Mon, 02 Dec 2024 19:16:19 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id AFUiM4IHTmdPfgAA62LTzQ (envelope-from ) for ; Mon, 02 Dec 2024 20:16:18 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=Eqcc1Jsw; dmarc=pass (policy=none) header.from=gmail.com; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1733166978; a=rsa-sha256; cv=none; b=UEt5JtDr0LNBxkbAS3tzEsmRGTc+jaFKyFVJHeMPyf50yW5x7werbCZgi7NSmKcgD+hEcq KLMwr+KF33SSnYBD3NcolzOCyPO9fTdz862LoF1QT+x3z+bqUAORWjBnysIH/mLInVVClM B2Q8TFjDYHuyLTSwM+9+1tfDar2RQd4Qhaz048IGFi1rOw+AEWS1OK/bcwog2pAvmsSj8T Af+nHKXS0i964vBhLLHRLQwgwHR98hscibz94BuRSfHI22PjIySLE40IE3BlXkz/w3U6NK IFay4ZOlW1uwS3MAWbpS1la8mgMCZceMXYxfeVpUYHnIWNzEU3slyhL9S53XmQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=Eqcc1Jsw; dmarc=pass (policy=none) header.from=gmail.com; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1733166978; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=GZtd01U0lLnRn3d1IC8QGWAdv2vF58nI2nHO+EEpJXc=; b=qw462DWc/V6OCyWj//IqCZ81Epj+O9szxLkJXPI+WHqUS0ReirTaTfl+BKfxNl8k8Md5Ww D/n6nb84YtX6CegWPgMKwY06p5TzB7i6Hx5AGxy4d2JpdAG6r2IPKO644UR4WV5OIhC/j8 IqAmbCTFpH2QaNmVcYbrYb/us2DiC3Gkp8FIxeOaPB/tqw2eehb+EanacwoKuhxSVkkc7v 0eQsOb/Tx0ig9Ay5pLt0rJB6CLCuu0Fw16jy3sKmOmChnJbc+Mm2bN8XmVFB51jwUJeeTn CzEbAZz0SrsbbJyqKKqV4mAVDusNPh2SkKbzdbYfbGdOIG07ixFsNOiHVC4CDw== 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 59EF718F0C for ; Mon, 02 Dec 2024 20:16:16 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tIBsv-0002Tc-7f; Mon, 02 Dec 2024 14:15:05 -0500 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 1tIBss-0002Qp-Rc for guix-devel@gnu.org; Mon, 02 Dec 2024 14:15:03 -0500 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tIBsr-0006zN-4y for guix-devel@gnu.org; Mon, 02 Dec 2024 14:15:02 -0500 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-4349f160d62so39535375e9.2 for ; Mon, 02 Dec 2024 11:15:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1733166899; x=1733771699; darn=gnu.org; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=GZtd01U0lLnRn3d1IC8QGWAdv2vF58nI2nHO+EEpJXc=; b=Eqcc1JswDgvkItZgkyFBFTDO6iQNl8h52MDzz/2mD8V8BTRjDFc37SkSNUzi4yxPa5 SxilIoftHjeQMQwvW5eSZ7a3SQZOqWJpxK+1qGzXBmm9CPN+xocVs//CotkyW6Oc3ip8 UubOFMRxZXDfzsOR1SC9gjbzYpDbU62dX/0lZvoeukghkBE0ynFSmrwbIcAhGydK6mfB eWGxMTGsOlwxUZ/P6f9+gcBCkAr38btRwrxHOSYIFfC64+ZU3FQ0HlLdysUkbvjVrZ9w IGIwlBEWmMdobJRdQ5i97Va0ayAGRJA/MfscgqGULW67HYzzd117fH8FZ1xtRWU6X36R fjXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733166899; x=1733771699; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:to:from:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=GZtd01U0lLnRn3d1IC8QGWAdv2vF58nI2nHO+EEpJXc=; b=hR3JZt1P9f81/JR6dR3AqRR1DAAr1NeA6druCZ8dn5AjPHs/3YOnxGIjEo7jnSxI/I 6iIkL0IjRD2N7Muuvq/MR7YPGMNZ1a2k9cABg+U1W4BpMWecxSuG5Reo4zBA/ofF9Qmi H9CzKlP0+EFiNATkReVm43MClg7ASKJQP9qGL2FmtFn6tx/8c3RTOu+ZYwxGru2UvTAy hnNHqR4ApYES7BJYqI/IFNDU9+WyVURzMnuDdxsklWrBj+r3++hMBDwDHDYKtUHTpjXq hOXq7zaxfdwNSkP0X1I9W4yXD3K6bvKywCtIwO39juClOHeHHgrEmsdutFWOzAxSyQ04 6ziQ== X-Forwarded-Encrypted: i=1; AJvYcCXhWnVlBOCbE/9FjoaEiyN52/qUijlZEYrHtMK/o2gFLvSzvs7FvgQYUp4bmlugNBAp7Xx+BSTfiP5N@gnu.org X-Gm-Message-State: AOJu0YyigtHZbXbrvUvmE660HR89UUIvc6l9CfKZk0UKt9//DFbwl+sW ZCys8+PdODLgUHj47sP2iJ+LNJUKJWEF7yVXwhYonhMq7e0MWfB5lt0p3A== X-Gm-Gg: ASbGnctvq0X03dcKpF20+kr0wGsVk48JA57eqtxpBCLZtMr2qRvIFMJDGI0WxOdwgdD ei/h6eW9FzM0Yjvm/bXGH06TCWX9biA3lKxYQ/ltF+eomNjX8RYB9+DHKxhk3gsvq0ACwxGLFMM UnXIlydrakg0G+/ZZPBpaxnSxPIWEO+5FkAejSA+j/0w5PeM2mDgCR/gS48jBSYNoFztVeqmypU CUb3TnrHO3XVq1vHN/GMz0kZW4CxgfZZ0R9Elf/ZB9iF1KCSXoEEbRTEpYExY2QajeF/DjZFcyy LVPZq5g0FnFZj0H7clWy7NXDygXC+geK3k0= X-Google-Smtp-Source: AGHT+IG9RP9oMDHZYOmvlTDF/b8g8fPZ6GNQpaMn6UTEB2j8PdCGQ27z+zkKVjifgCzw2EXYE7uV/A== X-Received: by 2002:a05:600c:314d:b0:434:a75b:5f6c with SMTP id 5b1f17b1804b1-434a9dbea45mr255464695e9.10.1733166899397; Mon, 02 Dec 2024 11:14:59 -0800 (PST) Received: from lili (roam-nat-fw-prg-194-254-61-42.net.univ-paris-diderot.fr. [194.254.61.42]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-434c132b4c8sm93663755e9.36.2024.12.02.11.14.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Dec 2024 11:14:59 -0800 (PST) From: Simon Tournier To: Justin Veilleux , guix-devel@gnu.org Subject: Re: Alternative syntax for interacting with the store monad In-Reply-To: <875xo49w0p.fsf@cock.li> References: <875xo49w0p.fsf@cock.li> Date: Mon, 02 Dec 2024 18:15:24 +0100 Message-ID: <87h67mnh03.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=zimon.toutoune@gmail.com; helo=mail-wm1-x336.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, FREEMAIL_FROM=0.001, 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: 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -5.18 X-Spam-Score: -5.18 X-Migadu-Queue-Id: 59EF718F0C X-Migadu-Scanner: mx12.migadu.com X-TUID: pjtyZ6sPWEdy Hi, On Sat, 30 Nov 2024 at 17:50, Justin Veilleux wrote: > (define (list-bind xs f) > (apply append! (map f xs))) > > (define list-pure list) > > (with-monad list-bind list-pure > (let ((x (bind '(1 2)))) > (pure > (list > x > (bind '("thing1" "thing2")))))) In [1], Josselin proposed something =C3=A0 la Haskell: (mdo %store-monad (drv <- (gexp-derivation "myderivation" test-gexp)) (output <- (return (derivation->output-path drv))) (built-derivations (list drv)) (return (format #t "~a~%" output))) Well, the conclusion seems that =C2=AB it=E2=80=99s normally not necessary = to use the monadic interface unless you=E2=80=99re getting into internals or writing a= new tool. =C2=BB Therefore, I do not know if improving the syntax is worth. Cheers, simon 1: Re: Viewing derivation output in the store Josselin Poiret Thu, 21 Apr 2022 09:44:05 +0200 id:87v8v2g9tm.fsf@jpoiret.xyz https://lists.gnu.org/archive/html/guix-devel/2022-04 https://yhetil.org/guix/87v8v2g9tm.fsf@jpoiret.xyz