From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 06 12:20:25 2022 Received: (at submit) by debbugs.gnu.org; 6 Apr 2022 16:20:25 +0000 Received: from localhost ([127.0.0.1]:58996 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nc8OP-0006SB-C5 for submit@debbugs.gnu.org; Wed, 06 Apr 2022 12:20:25 -0400 Received: from lists.gnu.org ([209.51.188.17]:48772) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nc8ON-0006S3-DQ for submit@debbugs.gnu.org; Wed, 06 Apr 2022 12:20:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38766) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nc8OM-0007vc-Ms for bug-guix@gnu.org; Wed, 06 Apr 2022 12:20:23 -0400 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]:58651) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nc8OK-0007EH-0A for bug-guix@gnu.org; Wed, 06 Apr 2022 12:20:22 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 8C3833202127 for ; Wed, 6 Apr 2022 12:20:11 -0400 (EDT) Received: from imap43 ([10.202.2.93]) by compute2.internal (MEProxy); Wed, 06 Apr 2022 12:20:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=munksgaard.me; h=cc:content-type:date:date:from:from:in-reply-to:message-id :mime-version:reply-to:sender:subject:subject:to:to; s=fm1; bh=m 5Vu3Q92iU8zvvnpi13egDWAo9BfCZ4XG7xmYsqpnjU=; b=leJoeVsq5cLHio2dU jreeyr1UQ0nTbiREMuzAQ0g0uPi3HUk+6UdHsYERbLy3k7bKOLRZz8eWBNzNtQoJ lXBm5pk0Zvi43ZNwsfkLIZOoJOLOtiB+2BK48HRvm2W99RKd6PG1IkajeYhCI8g2 /NG4JXNeKKDx4arKTQRrD3gIf0Moes3PxP5rk1knfipvIuZ7uXtt1CKw7DFPhc3V WH/mnKT3m/PBem5tAy8YckcuXWOa99riYH2p0YNR4I6mV4C/etaAG/At7xO1prSn KXV5OKo3obfnKe0ufTecHSnyEEY8k1spgQFbf1nQv+tNz3mPVRLX+YtGkuLe+frj Bd13g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:date:from:from :in-reply-to:message-id:mime-version:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=m5Vu3Q92iU8zvvnpi13egDWAo9BfCZ4XG7xmYsqpn jU=; b=EHP8WzrQGDzrKzE0chtEIxhnZ76IEVdptk3BM5QLEfrY3M0C1/aXuPNEB ij94emoq+zXEd9c0s1PKxXQ5nq4RsqfcWNYzvDe2YwL9MU4uIf+RY0PxnzcEvEKH xCpAscjLMop7Ey0qQxvG0QY6AhxQX9oFzWokkSp1gvBTQIL9I0yFMKCCPVxCf5cZ Li633+seMlmV4RyjY67W7yKbAf8XQ5SGjaOpABfiszUREovkIUpZLP1UPyOsZc7P 4AC3sIQ9zvG2FH82IpmiZAevggMXoYexDxG7+anauiC2uiUvt2FRXk/Us193OhGS WMNhc2rDum//ui4BxDfUhDwqP/2Hg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudejiedguddttdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepofgfggfkfffhvffutgesthdtre dtreertdenucfhrhhomhepfdfrhhhilhhiphcuofhunhhkshhgrggrrhgufdcuoehphhhi lhhiphesmhhunhhkshhgrggrrhgurdhmvgeqnecuggftrfgrthhtvghrnhepteduieeuvd dttddtudekudduffduteefteegvdegteetffffhffghfeutddthfejnecuffhomhgrihhn pehrvggrughthhgvughotghsrdhiohdphhgrshhkvghllhdrohhrghenucevlhhushhtvg hrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehphhhilhhiphesmhhunhhk shhgrggrrhgurdhmvg X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 0D438AC0EAD; Wed, 6 Apr 2022 12:20:11 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.7.0-alpha0-385-g3a17909f9e-fm-20220404.001-g3a17909f Mime-Version: 1.0 Message-Id: <86aa9c55-a4b0-4075-bdf6-8281885ab835@www.fastmail.com> Date: Wed, 06 Apr 2022 18:19:49 +0200 From: "Philip Munksgaard" To: bug-guix@gnu.org Subject: import: hackage: `elif` conditionals not supported Content-Type: text/plain Received-SPF: pass client-ip=64.147.123.24; envelope-from=philip@munksgaard.me; helo=wout1-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.7 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.7 (--) Since Cabal 2.2 conditional blocks support the `elif` construct [0], but our hackage importer does not currently support such expressions. This causes importing packages like `raaz` [1] to fail. 0: https://cabal.readthedocs.io/en/latest/cabal-package.html?highlight=elif#conditional-blocks 1: https://hackage.haskell.org/package/raaz From debbugs-submit-bounces@debbugs.gnu.org Sat May 14 09:53:53 2022 Received: (at submit) by debbugs.gnu.org; 14 May 2022 13:53:53 +0000 Received: from localhost ([127.0.0.1]:46041 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1npsDQ-0007bR-3h for submit@debbugs.gnu.org; Sat, 14 May 2022 09:53:53 -0400 Received: from lists.gnu.org ([209.51.188.17]:59244) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1npsDO-0007bJ-3J for submit@debbugs.gnu.org; Sat, 14 May 2022 09:53:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60468) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1npsDN-0005hN-QN for bug-guix@gnu.org; Sat, 14 May 2022 09:53:49 -0400 Received: from mout-p-102.mailbox.org ([80.241.56.152]:41978) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1npsDJ-0003At-Uw for bug-guix@gnu.org; Sat, 14 May 2022 09:53:49 -0400 Received: from smtp102.mailbox.org (smtp102.mailbox.org [10.196.197.102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4L0n6V4V43z9sd5; Sat, 14 May 2022 15:53:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6xq.net; s=MBO0001; t=1652536418; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Xo9n+Eca0MpapiK5C8+NXKH9B1ARNHQfUcwY+pKXmRw=; b=qsEQxeMOvbs5Sa2f8ogyh+jAZ0m5+yT9EfEID4iCqB3MLOA+SGaNctyHmHZzzdgFpFHnph BPszM05TV34ArG0skF6ypX6EGiIodmnSEQej5ldVjHg1DU/a6Rmgte57kcYQdlUhsDRase fx/cS1hAwxALoN38lh6T9kndJZO+qhKpgdvDM/D/bkdApUZ1nVFDuhQVQWnwwMIIIN9Oyg vhH2bhO5dtCKfnkSf/aw7f5sZy1Nh7vHRc3p6iho8CguY12PpXBjI3Kuf0EX+LiAMVahLm /QlfLRFmzskWE5WlQlaZgfsydbH0A6yC6Lzz77AAVCGREfadxbdHwZJBIMYGQg== Date: Sat, 14 May 2022 15:53:36 +0200 From: Lars-Dominik Braun To: Philip Munksgaard Subject: Re: import: hackage: `elif` conditionals not supported Message-ID: References: <86aa9c55-a4b0-4075-bdf6-8281885ab835@www.fastmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="7hILKtZWsjDgrz8c" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <86aa9c55-a4b0-4075-bdf6-8281885ab835@www.fastmail.com> Received-SPF: pass client-ip=80.241.56.152; envelope-from=lars@6xq.net; helo=mout-p-102.mailbox.org X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.7 (-) X-Debbugs-Envelope-To: submit Cc: bug-guix@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.7 (--) --7hILKtZWsjDgrz8c Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit Hi Philip, > Since Cabal 2.2 conditional blocks support the `elif` construct [0], but our hackage importer does not currently support such expressions. This causes importing packages like `raaz` [1] to fail. attached patch series fixes the import for `raaz` by adding support for elif and other minor adjustments. There still is syntax we do not support, most importantly mixed indentation, which is already documented as xfail via a testcase. I’m adding a few more. Could you have a look please if these make sense? Cheers, Lars --7hILKtZWsjDgrz8c Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="0001-import-cabal-Support-elif-statement.patch" >From 6b47c1d399922b60dafa01105daa1b7ea3da3935 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Sat, 30 Apr 2022 15:38:44 +0200 Subject: [PATCH 1/5] import: cabal: Support elif statement. * guix/import/cabal.scm (make-cabal-parser): Replace if-then-else grammar case with elif-else, modify if-then accordingly. (is-elif): New procedure. (lex-elif): Likewise. (is-id): Add elif keyword. (lex-word): Add test for elif. * tests/hackage.scm (test-cabal-if): New variale. (test-cabal-else): Likewise. (test-cabal-elif): Likewise. (test-cabal-elif-brackets): Likewise. (match-ghc-elif): Likewise. ("hackage->guix-package test lonely if statement", "hackage->guix-package test else statement", "hackage->guix-package test elif statement", "hackage->guix-package test elif statement with brackets"): New tests. --- guix/import/cabal.scm | 63 ++++++++++++++------------ tests/hackage.scm | 102 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 136 insertions(+), 29 deletions(-) diff --git a/guix/import/cabal.scm b/guix/import/cabal.scm index 98d7234098..e1a082a31a 100644 --- a/guix/import/cabal.scm +++ b/guix/import/cabal.scm @@ -149,7 +149,7 @@ (define (make-cabal-parser) (right: IF FLAG EXEC TEST-SUITE CUSTOM-SETUP SOURCE-REPO BENCHMARK LIB COMMON OCURLY) (left: OR) (left: PROPERTY AND) - (right: ELSE NOT)) + (right: ELIF ELSE NOT)) ;; --- rules (body (properties sections) : (append $1 $2)) (sections (sections flags) : (append $1 $2) @@ -193,32 +193,32 @@ (define (make-cabal-parser) (LIB open exprs close) : `(section library ,$3)) (exprs (exprs PROPERTY) : (append $1 (list $2)) (PROPERTY) : (list $1) - (exprs if-then-else) : (append $1 (list $2)) - (if-then-else) : (list $1) - (exprs if-then) : (append $1 (list $2)) - (if-then) : (list $1)) - (if-then-else (IF tests OCURLY exprs CCURLY ELSE OCURLY exprs CCURLY) - : `(if ,$2 ,$4 ,$8) - (IF tests open exprs close ELSE OCURLY exprs CCURLY) - : `(if ,$2 ,$4 ,$8) - ;; The 'open' token after 'tests' is shifted after an 'exprs' - ;; is found. This is because, instead of 'exprs' a 'OCURLY' - ;; token is a valid alternative. For this reason, 'open' - ;; pushes a with a line indentation equal to - ;; the indentation of 'exprs'. - ;; - ;; Differently from this, without the rule above this - ;; comment, when an 'ELSE' token is found, the 'open' token - ;; following the 'ELSE' would be shifted immediately, before - ;; the 'exprs' is found (because there are no other valid - ;; tokens). The 'open' would therefore create a - ;; with the indentation of 'ELSE' and not - ;; 'exprs', creating an inconsistency. We therefore allow - ;; mixed style conditionals. - (IF tests open exprs close ELSE open exprs close) - : `(if ,$2 ,$4 ,$8)) - (if-then (IF tests OCURLY exprs CCURLY) : `(if ,$2 ,$4 ()) - (IF tests open exprs close) : `(if ,$2 ,$4 ())) + (exprs elif-else) : (append $1 (list ($2 '(())))) + (elif-else) : (list ($1 '(())))) + ;; LALR(1) parsers prefer to be left-recursive, which make if-statements slightly involved. + ;; XXX: This technically allows multiple else statements. + (elif-else (elif-else ELIF tests OCURLY exprs CCURLY) : (lambda (y) ($1 (list (append (list 'if $3 $5) y)))) + (elif-else ELIF tests open exprs close) : (lambda (y) ($1 (list (append (list 'if $3 $5) y)))) + (elif-else ELSE OCURLY exprs CCURLY) : (lambda (y) ($1 (list $4))) + ;; The 'open' token after 'tests' is shifted after an 'exprs' + ;; is found. This is because, instead of 'exprs' a 'OCURLY' + ;; token is a valid alternative. For this reason, 'open' + ;; pushes a with a line indentation equal to + ;; the indentation of 'exprs'. + ;; + ;; Differently from this, without the rule above this + ;; comment, when an 'ELSE' token is found, the 'open' token + ;; following the 'ELSE' would be shifted immediately, before + ;; the 'exprs' is found (because there are no other valid + ;; tokens). The 'open' would therefore create a + ;; with the indentation of 'ELSE' and not + ;; 'exprs', creating an inconsistency. We therefore allow + ;; mixed style conditionals. + (elif-else ELSE open exprs close) : (lambda (y) ($1 (list $4))) + ;; Terminating rule. + (if-then) : (lambda (y) (append $1 y))) + (if-then (IF tests OCURLY exprs CCURLY) : (list 'if $2 $4) + (IF tests open exprs close) : (list 'if $2 $4)) (tests (TEST OPAREN ID CPAREN) : `(,$1 ,$3) (TRUE) : 'true (FALSE) : 'false @@ -386,6 +386,8 @@ (define is-lib (make-rx-matcher "^library *" regexp/icase)) (define is-else (make-rx-matcher "^else" regexp/icase)) +(define (is-elif s) (string-ci=? s "elif")) + (define (is-if s) (string-ci=? s "if")) (define (is-true s) (string-ci=? s "true")) @@ -402,8 +404,8 @@ (define (is-or s) (string=? s "||")) (define (is-id s port loc) (let ((cabal-reserved-words - '("if" "else" "library" "flag" "executable" "test-suite" "custom-setup" - "source-repository" "benchmark" "common")) + '("if" "else" "elif" "library" "flag" "executable" "test-suite" + "custom-setup" "source-repository" "benchmark" "common")) (spaces (read-while (cut char-set-contains? char-set:blank <>) port)) (c (peek-char port))) (unread-string spaces port) @@ -494,6 +496,8 @@ (define (lex-lib loc) (make-lexical-token 'LIB loc #f)) (define (lex-else loc) (make-lexical-token 'ELSE loc #f)) +(define (lex-elif loc) (make-lexical-token 'ELIF loc #f)) + (define (lex-if loc) (make-lexical-token 'IF loc #f)) (define (lex-true loc) (make-lexical-token 'TRUE loc #t)) @@ -568,6 +572,7 @@ (define (lex-word port loc) LOC is the current port location." (let* ((w (read-delimited " <>=()\t\n" port 'peek))) (cond ((is-if w) (lex-if loc)) + ((is-elif w) (lex-elif loc)) ((is-test w port) (lex-test w loc)) ((is-true w) (lex-true loc)) ((is-false w) (lex-false loc)) diff --git a/tests/hackage.scm b/tests/hackage.scm index 189b9af173..38f75b268e 100644 --- a/tests/hackage.scm +++ b/tests/hackage.scm @@ -309,6 +309,108 @@ (define test-cabal-flag-executable (test-assert "hackage->guix-package test flag executable" (eval-test-with-cabal test-cabal-flag-executable match-ghc-foo)) +;; Check if-elif-else statements +(define test-cabal-if + "name: foo +version: 1.0.0 +homepage: http://test.org +synopsis: synopsis +description: description +license: BSD3 +library + if os(first) + Build-depends: ghc-c +") + +(define test-cabal-else + "name: foo +version: 1.0.0 +homepage: http://test.org +synopsis: synopsis +description: description +license: BSD3 +library + if os(first) + Build-depends: ghc-a + else + Build-depends: ghc-c +") + +(define test-cabal-elif + "name: foo +version: 1.0.0 +homepage: http://test.org +synopsis: synopsis +description: description +license: BSD3 +library + if os(first) + Build-depends: ghc-a + elif os(second) + Build-depends: ghc-b + elif os(guix) + Build-depends: ghc-c + elif os(third) + Build-depends: ghc-d + else + Build-depends: ghc-e +") + +;; Try the same with different bracket styles +(define test-cabal-elif-brackets + "name: foo +version: 1.0.0 +homepage: http://test.org +synopsis: synopsis +description: description +license: BSD3 +library + if os(first) { + Build-depends: ghc-a + } + elif os(second) + Build-depends: ghc-b + elif os(guix) { Build-depends: ghc-c } + elif os(third) { + Build-depends: ghc-d } + else + Build-depends: ghc-e +") + +(define-package-matcher match-ghc-elif + ('package + ('name "ghc-foo") + ('version "1.0.0") + ('source + ('origin + ('method 'url-fetch) + ('uri ('hackage-uri "foo" 'version)) + ('sha256 + ('base32 + (? string? hash))))) + ('build-system 'haskell-build-system) + ('inputs ('list 'ghc-c)) + ('home-page "http://test.org") + ('synopsis (? string?)) + ('description (? string?)) + ('license 'license:bsd-3))) + +(test-assert "hackage->guix-package test lonely if statement" + (eval-test-with-cabal test-cabal-else match-ghc-elif + #:cabal-environment '(("os" . "guix")))) + +(test-assert "hackage->guix-package test else statement" + (eval-test-with-cabal test-cabal-else match-ghc-elif + #:cabal-environment '(("os" . "guix")))) + +(test-assert "hackage->guix-package test elif statement" + (eval-test-with-cabal test-cabal-elif match-ghc-elif + #:cabal-environment '(("os" . "guix")))) + +(test-assert "hackage->guix-package test elif statement with brackets" + (eval-test-with-cabal test-cabal-elif-brackets match-ghc-elif + #:cabal-environment '(("os" . "guix")))) + ;; Check Hackage Cabal revisions. (define test-cabal-revision "name: foo -- 2.35.1 --7hILKtZWsjDgrz8c Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="0002-import-cabal-Allow-curly-brackets-in-more-positions.patch" >From dad8dbb8dde18716921523b5db722a168410740a Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Sat, 30 Apr 2022 15:39:34 +0200 Subject: [PATCH 2/5] import: cabal: Allow curly brackets in more positions. * guix/import/cabal.scm (is-layout-property): Do not expect end of line. (lex-layout-property): Check for newline. (lex-property): Stop reading on closing curly bracket. * tests/hackage.scm (test-read-cabal-2): New variable. ("read-cabal test: if brackets on the same line"): New test. --- guix/import/cabal.scm | 11 ++++++++--- tests/hackage.scm | 16 ++++++++++++++++ 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/guix/import/cabal.scm b/guix/import/cabal.scm index e1a082a31a..364fcc3176 100644 --- a/guix/import/cabal.scm +++ b/guix/import/cabal.scm @@ -354,7 +354,7 @@ (define* (make-rx-matcher pat #:optional (flag #f)) (make-regexp pat)))) (cut regexp-exec rx <>))) -(define is-layout-property (make-rx-matcher "([a-z0-9-]+)[ \t]*:[ \t]*(\\w?[^{}]*)$" +(define is-layout-property (make-rx-matcher "([a-z0-9-]+)[ \t]*:[ \t]*(\\w?[^{}]*)" regexp/icase)) (define is-braced-property (make-rx-matcher "([a-z0-9-]+)[ \t]*:[ \t]*\\{[ \t]*$" @@ -465,7 +465,10 @@ (define (lex-layout-property k-v-rx-res loc port) (value (match:substring k-v-rx-res 2))) (make-lexical-token 'PROPERTY loc - (list key `(,(read-value port value (current-indentation))))))) + (list key `(,(if (eqv? (peek-char port) #\newline) ; The next character + ; is not necessarily a newline if a bracket follows the property. + (read-value port value (current-indentation)) + value)))))) (define (lex-braced-property k-rx-res loc port) (let ((key (string-downcase (match:substring k-rx-res 1)))) @@ -600,7 +603,9 @@ (define (lex-line port loc) (else (unread-string s port) #f)))) (define (lex-property port loc) - (let* ((s (read-delimited "\n" port 'peek))) + ;; Stop reading on a }, so closing brackets (for example during + ;; if-clauses) work properly. + (let* ((s (read-delimited "\n}" port 'peek))) (cond ((is-braced-property s) => (cut lex-braced-property <> loc port)) ((is-layout-property s) => (cut lex-layout-property <> loc port)) diff --git a/tests/hackage.scm b/tests/hackage.scm index 38f75b268e..15309a3381 100644 --- a/tests/hackage.scm +++ b/tests/hackage.scm @@ -156,6 +156,12 @@ (define test-read-cabal-1 Exposed-Modules: Test.QuickCheck.Exception") +(define test-read-cabal-2 + "name: test-me +common defaults + if os(foobar) { cc-options: -DBARBAZ } +") ; Intentional newline. + (test-begin "hackage") (define-syntax-rule (define-package-matcher name pattern) @@ -471,6 +477,16 @@ (define-package-matcher match-ghc-foo-revision #t) (x (pk 'fail x #f)))) +(test-assert "read-cabal test: if brackets on the same line" + (match (call-with-input-string test-read-cabal-2 read-cabal) + ((("name" ("test-me")) + ('section 'common "defaults" + (('if ('os "foobar") + (("cc-options" ("-DBARBAZ "))) + ())))) + #t) + (x (pk 'fail x #f)))) + (define test-cabal-import "name: foo version: 1.0.0 -- 2.35.1 --7hILKtZWsjDgrz8c Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="0003-import-cabal-Allow-properties-without-space-between-.patch" >From ba96d2e9af8f0b952bfa90f548e4e06dbdec4777 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Sat, 30 Apr 2022 15:39:51 +0200 Subject: [PATCH 3/5] import: cabal: Allow properties without space between key and value. * guix/import/cabal.scm (lex-word): Add colon to delimiters. * tests/hackage.scm (test-cabal-property-no-space): New variable. ("hackage->guix-package test properties without space"): New test. --- guix/import/cabal.scm | 2 +- tests/hackage.scm | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/guix/import/cabal.scm b/guix/import/cabal.scm index 364fcc3176..9f3862fa14 100644 --- a/guix/import/cabal.scm +++ b/guix/import/cabal.scm @@ -573,7 +573,7 @@ (define (lex-single-char port loc) (define (lex-word port loc) "Process tokens which can be recognized by reading the next word form PORT. LOC is the current port location." - (let* ((w (read-delimited " <>=()\t\n" port 'peek))) + (let* ((w (read-delimited " <>=():\t\n" port 'peek))) (cond ((is-if w) (lex-if loc)) ((is-elif w) (lex-elif loc)) ((is-test w port) (lex-test w loc)) diff --git a/tests/hackage.scm b/tests/hackage.scm index 15309a3381..4ce48b6baf 100644 --- a/tests/hackage.scm +++ b/tests/hackage.scm @@ -315,6 +315,25 @@ (define test-cabal-flag-executable (test-assert "hackage->guix-package test flag executable" (eval-test-with-cabal test-cabal-flag-executable match-ghc-foo)) +;; There is no mandatory space between property name and value. +(define test-cabal-property-no-space + "name:foo +version:1.0.0 +homepage:http://test.org +synopsis:synopsis +description:description +license:BSD3 +common bench-defaults + ghc-options:-Wall +executable cabal + build-depends: + HTTP >= 4000.2.5 && < 4000.3, + mtl >= 2.0 && < 3 +") + +(test-assert "hackage->guix-package test properties without space" + (eval-test-with-cabal test-cabal-property-no-space match-ghc-foo)) + ;; Check if-elif-else statements (define test-cabal-if "name: foo -- 2.35.1 --7hILKtZWsjDgrz8c Content-Type: text/plain; charset=utf-8 Content-Disposition: attachment; filename="0004-import-cabal-Allow-curly-bracket-before-else-stateme.patch" Content-Transfer-Encoding: 8bit >From 5f4e1c75a34744f04916e1db8056669e20708ef0 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Sun, 1 May 2022 08:34:42 +0200 Subject: [PATCH 4/5] import: cabal: Allow curly bracket before else statement. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * guix/import/cabal.scm (is-else): Turn into procedure. (lex-line): Move IS-ELSE… (lex-word): …here. * tests/hackage.scm (test-cabal-elif-brackets): Extend testcase. --- guix/import/cabal.scm | 4 ++-- tests/hackage.scm | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/guix/import/cabal.scm b/guix/import/cabal.scm index 9f3862fa14..8f59a63cb9 100644 --- a/guix/import/cabal.scm +++ b/guix/import/cabal.scm @@ -384,7 +384,7 @@ (define is-benchmark (make-rx-matcher "^benchmark +([a-z0-9_-]+)" (define is-lib (make-rx-matcher "^library *" regexp/icase)) -(define is-else (make-rx-matcher "^else" regexp/icase)) +(define (is-else s) (string-ci=? s "else")) (define (is-elif s) (string-ci=? s "elif")) @@ -576,6 +576,7 @@ (define (lex-word port loc) (let* ((w (read-delimited " <>=():\t\n" port 'peek))) (cond ((is-if w) (lex-if loc)) ((is-elif w) (lex-elif loc)) + ((is-else w) (lex-else loc)) ((is-test w port) (lex-test w loc)) ((is-true w) (lex-true loc)) ((is-false w) (lex-false loc)) @@ -599,7 +600,6 @@ (define (lex-line port loc) ((is-custom-setup s) => (cut lex-custom-setup <> loc)) ((is-benchmark s) => (cut lex-benchmark <> loc)) ((is-lib s) (lex-lib loc)) - ((is-else s) (lex-else loc)) (else (unread-string s port) #f)))) (define (lex-property port loc) diff --git a/tests/hackage.scm b/tests/hackage.scm index 4ce48b6baf..98f9c34fd2 100644 --- a/tests/hackage.scm +++ b/tests/hackage.scm @@ -398,7 +398,10 @@ (define test-cabal-elif-brackets elif os(guix) { Build-depends: ghc-c } elif os(third) { Build-depends: ghc-d } - else + elif os(fourth) + { + Build-depends: ghc-d + } else Build-depends: ghc-e ") -- 2.35.1 --7hILKtZWsjDgrz8c Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="0005-import-cabal-Document-failing-syntax-through-tests.patch" >From bd67403967e86d41235ef3af2e142869bc6c5c48 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Sat, 14 May 2022 15:38:14 +0200 Subject: [PATCH 5/5] import: cabal: Document failing syntax through tests. * tests/hackage.scm (test-read-cabal-brackets-newline): New variable. (test-cabal-no-final-newline): Likewise. ("hackage->guix-package test without final newline", "read-cabal test: property brackets on new line"): New tests. --- tests/hackage.scm | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/tests/hackage.scm b/tests/hackage.scm index 98f9c34fd2..d7ecd0cc21 100644 --- a/tests/hackage.scm +++ b/tests/hackage.scm @@ -162,6 +162,16 @@ (define test-read-cabal-2 if os(foobar) { cc-options: -DBARBAZ } ") ; Intentional newline. +;; Test opening bracket on new line. +(define test-read-cabal-brackets-newline + "name: test-me +common defaults + build-depends: + { foobar + , barbaz + } +") + (test-begin "hackage") (define-syntax-rule (define-package-matcher name pattern) @@ -334,6 +344,21 @@ (define test-cabal-property-no-space (test-assert "hackage->guix-package test properties without space" (eval-test-with-cabal test-cabal-property-no-space match-ghc-foo)) +;; There may be no final newline terminating a property. +(define test-cabal-no-final-newline +"name: foo +version: 1.0.0 +homepage: http://test.org +synopsis: synopsis +description: description +license: BSD3 +executable cabal + build-depends: HTTP >= 4000.2.5 && < 4000.3, mtl >= 2.0 && < 3") + +(test-expect-fail 1) +(test-assert "hackage->guix-package test without final newline" + (eval-test-with-cabal test-cabal-no-final-newline match-ghc-foo)) + ;; Check if-elif-else statements (define test-cabal-if "name: foo @@ -509,6 +534,15 @@ (define-package-matcher match-ghc-foo-revision #t) (x (pk 'fail x #f)))) +(test-expect-fail 1) +(test-assert "read-cabal test: property brackets on new line" + (match (call-with-input-string test-read-cabal-brackets-newline read-cabal) + ((("name" ("test-me")) + ('section 'common "defaults" + (("build-depends" ("foobar , barbaz"))))) + #t) + (x (pk 'fail x #f)))) + (define test-cabal-import "name: foo version: 1.0.0 -- 2.35.1 --7hILKtZWsjDgrz8c-- From debbugs-submit-bounces@debbugs.gnu.org Mon May 16 15:08:37 2022 Received: (at submit) by debbugs.gnu.org; 16 May 2022 19:08:37 +0000 Received: from localhost ([127.0.0.1]:55076 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nqg56-0002jH-PR for submit@debbugs.gnu.org; Mon, 16 May 2022 15:08:36 -0400 Received: from lists.gnu.org ([209.51.188.17]:34856) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nqg54-0002jA-WD for submit@debbugs.gnu.org; Mon, 16 May 2022 15:08:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40990) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nqg54-0004h1-Mg for bug-guix@gnu.org; Mon, 16 May 2022 15:08:34 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:42095) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nqg52-0006TO-QL for bug-guix@gnu.org; Mon, 16 May 2022 15:08:34 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id AC5DB5C01F1; Mon, 16 May 2022 15:08:30 -0400 (EDT) Received: from imap43 ([10.202.2.93]) by compute2.internal (MEProxy); Mon, 16 May 2022 15:08:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=munksgaard.me; h=cc:cc:content-transfer-encoding:content-type:date:date:from :from:in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm1; t=1652728110; x= 1652814510; bh=SbtsVsVgSp6pn0950gbllt5UhoPPlUVxnyD0mBNFPfU=; b=v EmOLgL3Mkt66/Af0fqz6ULJ8S2o8riSypKC7EPiGMnXPGKeAJyK1Jal6cTSzTLlv Z6Dwzo446iVxvbWZAuGZfXTY8XqwC2orkAr5q567po0E5+AAsiN4FZClE7lloEXe 4UQWNtDkkmepHUtPKLiXNeo1ca86K9vgSy++gubxRacoSqMfZcKk6/l62MAFdtGC sl8WuPn2JaP3MBSooNaUHucxEDLt481aO2p+56/FvoYy1jRXLwTi2CC0wRpd3kzf XAo0csdP2zl44ulkWIEAeuEXbrqLSj8C/WIZ8BwvzTuowcPTWza4EXNWhQsU78iS 5ecl6nm1k8nNop1Jr+9Jg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; t=1652728110; x=1652814510; bh=SbtsVsVgSp6pn 0950gbllt5UhoPPlUVxnyD0mBNFPfU=; b=ffk8WM7ijiLaZndHQi8gkk+D1Gezv z7FYK3IY9O+XSH1gLXOGhorgbNP+zAQs4obOmbFOx/4RdDBuHg+Z9lVe5zg5Y5Nx YAfo9Q1+nIWi62/n2NGlzZvWcvrPDHC5h+R0t7CkIsGOkuVwyFZz55FemNErhzJj Swml5+vgiDe3EOu1kEARKCPy8Lr5zpiEpFp6P9zbdzWA/9knL0TUHfjfbnLvEOsS fDLUnXNmkP67NiyF0zhj67QEbISHWsneAA4M9yT8B8wZJlQpwIZ/SSfCqgyuS05q ejXjhLsqNJWQRyXP64i3+y1QOcbzU4S+y3BoCTjLM/sdgMd5RPpj9MgXg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrheehgddufeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtgfesthhqredtreerjeenucfhrhhomhepfdfr hhhilhhiphcuofhunhhkshhgrggrrhgufdcuoehphhhilhhiphesmhhunhhkshhgrggrrh gurdhmvgeqnecuggftrfgrthhtvghrnhepgfehteeiffduleetffehuefgtdefgfevjedv vefhveeviedtkeelveejhfehgfelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrg hmpehmrghilhhfrhhomhepphhhihhlihhpsehmuhhnkhhsghgrrghrugdrmhgv X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 4D2C02D4005F; Mon, 16 May 2022 15:08:30 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.7.0-alpha0-591-gfe6c3a2700-fm-20220427.001-gfe6c3a27 Mime-Version: 1.0 Message-Id: <7c74e5b9-6c37-4b9b-aa3b-40a4a5373e03@www.fastmail.com> In-Reply-To: References: <86aa9c55-a4b0-4075-bdf6-8281885ab835@www.fastmail.com> Date: Mon, 16 May 2022 21:08:09 +0200 From: "Philip Munksgaard" To: "Lars-Dominik Braun" Subject: Re: import: hackage: `elif` conditionals not supported Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=66.111.4.29; envelope-from=philip@munksgaard.me; helo=out5-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.7 (-) X-Debbugs-Envelope-To: submit Cc: John Kehayias X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.7 (--) Hi Lars=20 On Sat, 14 May 2022, at 15:53, Lars-Dominik Braun wrote: > attached patch series fixes the import for `raaz` by adding support for > elif and other minor adjustments. There still is syntax we do not supp= ort, > most importantly mixed indentation, which is already documented as xfa= il > via a testcase. I=E2=80=99m adding a few more. > > Could you have a look please if these make sense? > Looks like it works! Unfortunately, building raaz still fails (first bec= ause of the description, then because some internal libraries are added = as external dependencies, and then for... other reasons I haven't figure= d out. But all of those are separate issues. From debbugs-submit-bounces@debbugs.gnu.org Sun May 22 05:55:13 2022 Received: (at 54752) by debbugs.gnu.org; 22 May 2022 09:55:13 +0000 Received: from localhost ([127.0.0.1]:43673 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nsiIr-0004n8-3S for submit@debbugs.gnu.org; Sun, 22 May 2022 05:55:13 -0400 Received: from mout-p-202.mailbox.org ([80.241.56.172]:35574) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nsiIo-0004mt-5o for 54752@debbugs.gnu.org; Sun, 22 May 2022 05:55:11 -0400 Received: from smtp102.mailbox.org (smtp102.mailbox.org [IPv6:2001:67c:2050:b231:465::102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4L5bRV3Wpmz9t3C; Sun, 22 May 2022 11:55:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6xq.net; s=MBO0001; t=1653213302; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zb9GUgxD3V+icIm3GSaSV+qKFJWM0N2WYVsjUDHC624=; b=UydQqSv1gC8211fiSnKs4KvHEBS7DsW5yp4uXknyjAZqexwHMrH2PruPvkOTf9Nxk7mvaX DNENm35CrxbUrCgUf4uJ+D0NjM4JhB5H7uYIzF2dvdY88vy+9jnKOZS9offi0h52MpYH3U fOLltCkP4AqaOMKEP0VT3/q1iLaMwEcGBOwowrKCISrXVAzmmz/h6y9igE+ICX4PlSTwHl vn5nwCCHl3uEQ8zfqVDBrfznLt/BaQ2qHFiUii8vkbhGXE+oDy/LUG0fYxgJ4Bk0loN3Aw FmHvenqQl2tuYc9+jtS6OW9cPJ+1rWFmHMyV/j7hQpIo4R6/Eo8lQRX7VlJeKA== Date: Sun, 22 May 2022 11:55:00 +0200 From: Lars-Dominik Braun To: Philip Munksgaard Subject: Re: import: hackage: `elif` conditionals not supported Message-ID: References: <86aa9c55-a4b0-4075-bdf6-8281885ab835@www.fastmail.com> <7c74e5b9-6c37-4b9b-aa3b-40a4a5373e03@www.fastmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <7c74e5b9-6c37-4b9b-aa3b-40a4a5373e03@www.fastmail.com> X-Rspamd-Queue-Id: 4L5bRV3Wpmz9t3C X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 54752 Cc: 54752@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hi Philip, thank you! > Unfortunately, building raaz still fails (first because of the description, then because some internal libraries are added as external dependencies, and then for... other reasons I haven't figured out. But all of those are separate issues. You’re right, it fails with this error for me, which indicates haskell-build-system has a bug _somewhere_. ---snip--- starting phase `register' running "runhaskell Setup.hs" with command "register" and parameters ("--gen-pkg-config=/gnu/store/8m0w1688syvcmhjr2ym1max430jmwjag-ghc-raaz-0.3.6/ghc-raaz-0.3.6.conf") error: in phase 'register': uncaught exception: system-error "fport_read" "~A" ("Is a directory") (21) phase `register' failed after 6.9 seconds Backtrace: 11 (primitive-load "/gnu/store/jpf2lwn33nq08nkqrkr5q232c51…") In guix/build/gnu-build-system.scm: 906:2 10 (gnu-build #:source _ #:outputs _ #:inputs _ #:phases . #) In ice-9/boot-9.scm: 1752:10 9 (with-exception-handler _ _ #:unwind? _ # _) In srfi/srfi-1.scm: 634:9 8 (for-each # …) In ice-9/boot-9.scm: 1752:10 7 (with-exception-handler _ _ #:unwind? _ # _) In guix/build/gnu-build-system.scm: 927:23 6 (_) In guix/build/haskell-build-system.scm: 244:23 5 (register #:name _ #:system _ #:inputs _ #:outputs _) In ice-9/ports.scm: 433:17 4 (call-with-input-file _ _ #:binary _ #:encoding _ # _) In ice-9/rdelim.scm: 160:18 3 (read-string _) In unknown file: 2 (read-char #) In ice-9/boot-9.scm: 1685:16 1 (raise-exception _ #:continuable? _) 1685:16 0 (raise-exception _ #:continuable? _) ice-9/boot-9.scm:1685:16: In procedure raise-exception: In procedure fport_read: Is a directory ---snap--- Cheers, Lars From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 02 05:55:00 2022 Received: (at 54752) by debbugs.gnu.org; 2 Jun 2022 09:55:00 +0000 Received: from localhost ([127.0.0.1]:52878 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwhXf-00055c-W8 for submit@debbugs.gnu.org; Thu, 02 Jun 2022 05:55:00 -0400 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:58973) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwhXe-00055K-EN for 54752@debbugs.gnu.org; Thu, 02 Jun 2022 05:54:58 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 47E555C012C; Thu, 2 Jun 2022 05:54:53 -0400 (EDT) Received: from imap43 ([10.202.2.93]) by compute2.internal (MEProxy); Thu, 02 Jun 2022 05:54:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=munksgaard.me; h=cc:cc:content-transfer-encoding:content-type:date:date:from :from:in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm1; t=1654163693; x= 1654250093; bh=DDDGj3ovVL1ywah2MXzuGqk67Hwp9wCvY76qLohkosQ=; b=i kxiWj8TewCC5ssKhLKiyrxuPbGNjOiY32MzO3V7bI/H7giyX05RZQtqGottPNJux rc9J2bY0eOfLSngxvgsPa8G8SAG6hq1IoNE2md+S548vFuNJ/UpiQT+xZUMKqewT +fYun3bHpVgh6V7I88aN7+jVoq/8A4QhjYwMn+Lo2Idvz2wn1U2LRJe1ks7SHxBp rwcgAtiNzS3ztR5oLFMSrv0yG1ffeclgLCM77QMyPz6ziaAEn3YKnPEoTSsdyDFM 3A2mE7SR6BknBKV+n3IzVmX6OG9EU8ZaR24x12D4ctytgN2PAsu+fGL7FlhMDZQq iOQhh0m9Ss95jPF3h422w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1654163693; x= 1654250093; bh=DDDGj3ovVL1ywah2MXzuGqk67Hwp9wCvY76qLohkosQ=; b=d EEu5Emxfs2va14YhFkco2UOiHearOa5aFlAFMGrRiahqmnbbpQzj4KdaXt+kVTMK xzuIIED//fetzZk7ahXO4uNctPmS2A5emwFieVFfpQMLTc7Rh11JmagodI/lJ98d u/nuhSCcE1qgtVQr2BPeK7MQnflBYToXLmpNi+SJH/+EhTueYzf3YuTpp2OqO0FT DjNAQwQUx3UOeWfLiYTgKKxGrNa9V41bgSBqIfM5mp8XCpMk3E7iZAqseQXZ4uZ9 HdBAuMdTfMzk+7xPMkl4U+cZQqBbVXMToqmY0CVIJHl4awpRqsdBRmCM+bVw+SRp Bc3yWy01eT11CSAtHg5oQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrledvgddvtdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvvefutgfgsehtqhertderreejnecuhfhrohhmpedfrfhh ihhlihhpucfouhhnkhhsghgrrghrugdfuceophhhihhlihhpsehmuhhnkhhsghgrrghrug drmhgvqeenucggtffrrghtthgvrhhnpefgheetieffudelteffheeugfdtfefgveejvdev hfevveeitdekleevjefhhefgleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmh epmhgrihhlfhhrohhmpehphhhilhhiphesmhhunhhkshhgrggrrhgurdhmvg X-ME-Proxy: Feedback-ID: i1f894409:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id E13052D4006D; Thu, 2 Jun 2022 05:54:52 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.7.0-alpha0-591-gfe6c3a2700-fm-20220427.001-gfe6c3a27 Mime-Version: 1.0 Message-Id: In-Reply-To: References: <86aa9c55-a4b0-4075-bdf6-8281885ab835@www.fastmail.com> <7c74e5b9-6c37-4b9b-aa3b-40a4a5373e03@www.fastmail.com> Date: Thu, 02 Jun 2022 11:54:31 +0200 From: "Philip Munksgaard" To: "Lars-Dominik Braun" Subject: Re: import: hackage: `elif` conditionals not supported Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 54752 Cc: 54752@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On Sun, 22 May 2022, at 11:55, Lars-Dominik Braun wrote: > Hi Philip, > > thank you! > >> Unfortunately, building raaz still fails (first because of the descri= ption, then because some internal libraries are added as external depend= encies, and then for... other reasons I haven't figured out. But all of = those are separate issues. > > You=E2=80=99re right, it fails with this error for me, which indicates=20 > haskell-build-system has a bug _somewhere_. > Yes, I don't think that should hold back these patches from going into w= ip-haskell. From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 06 07:31:50 2022 Received: (at 54752-done) by debbugs.gnu.org; 6 Jun 2022 11:31:51 +0000 Received: from localhost ([127.0.0.1]:34537 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nyAxa-00047q-Oe for submit@debbugs.gnu.org; Mon, 06 Jun 2022 07:31:50 -0400 Received: from mout-p-201.mailbox.org ([80.241.56.171]:42594) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nyAxY-00041W-Is for 54752-done@debbugs.gnu.org; Mon, 06 Jun 2022 07:31:49 -0400 Received: from smtp2.mailbox.org (smtp2.mailbox.org [10.196.197.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4LGrt506xhz9sRD; Mon, 6 Jun 2022 13:31:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6xq.net; s=MBO0001; t=1654515101; h=from:from: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; bh=+KHmMxX/fAhySfWLxo5fFBgo6zdXzQ1T0Yj2PGu+4JU=; b=IlSV6nr6UJUjXXjEtSfQc9byjptDqoj0PKC76HzAS5Jk3WNzSaIdqDFIGIECxF6fDn2i0l EAXxJ9qxTuYo+sMTxM9Z67qFSdxIWVpWipBtkYHheGlZaQoy5oJ7cwDeCrnIvxmovJrZV4 mAQyLS2Z30UNPYlB7074qEaxi555yTB6PKWaQrccl0gfOcpdiTDTevEAd7M1ivee344J3a /Tj4Vt5qt/y+AMVokvWo45/w41tYn4ZVlX6VoR3fm0cUN74aBuM8kgT5iN7JDUebbc24vK 7y0FBkVX8nZETfr8C98G+coACNYBdCrzgCLEM8yoq6tGboP4eUpRVY4lR1zTDQ== Date: Mon, 6 Jun 2022 13:31:39 +0200 From: Lars-Dominik Braun To: Philip Munksgaard Subject: Re: import: hackage: `elif` conditionals not supported Message-ID: References: <86aa9c55-a4b0-4075-bdf6-8281885ab835@www.fastmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 54752-done Cc: 54752-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hi, fix pushed to master in commit 2c5d18e421e6c06f4a969f98585ec41aae8eb2e4. Cheers, Lars From unknown Fri Sep 05 11:50:31 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 05 Jul 2022 11:24:10 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator