[PATCH 0/6] Fix Haskell packages incompatible with latest LTSHaskell release.

  • Done
  • quality assurance status badge
Details
2 participants
  • Carlo Holl
  • Leo Famulari
Owner
unassigned
Submitted by
Carlo Holl
Severity
normal
C
C
Carlo Holl wrote on 25 Nov 2020 21:10
(address . guix-patches@gnu.org)(name . Carlo Holl)(address . carloholl@gmail.com)
20201125201032.1896-1-carloholl@gmail.com
Guix,

My recent contribution, pushed to master as e6bfb02eb79777b760031384d4a3c14239f7fb55 (bug#44174), introduced some haskell packages that are newer than the latest LTSHaskell release supported by Guix, as pointed out by Ricardo Wurmus. This patch series fixes that, representing a downgrade of several of the packages to versions matching the latest LTSHaskell release, as well as one package addition.

Carlo Holl (6):
gnu: ghc-tabular: Downgrade to 0.2.2.7.
gnu: ghc-doctest: Downgrade to 0.16.2.
gnu: Add ghc-easytest.
gnu: ghc-hledger-lib: Downgrade to 0.14.1.
gnu: hledger: Downgrade to 1.14.2.
gnu: ghc-cassava-megaparsec: Downgrade to 2.0.1.

gnu/packages/finance.scm | 19 +++++----
gnu/packages/haskell-check.scm | 75 ++++++++++++++++++++++++++++++++++
gnu/packages/haskell-xyz.scm | 35 +++++++---------
3 files changed, 99 insertions(+), 30 deletions(-)

--
2.29.2
C
C
Carlo Holl wrote on 25 Nov 2020 21:16
[PATCH 1/6] gnu: ghc-tabular: Downgrade to 0.2.2.7.
(address . 44873@debbugs.gnu.org)(name . Carlo Holl)(address . carloholl@gmail.com)
20201125201638.2044-1-carloholl@gmail.com
* gnu/packages/haskell-xyz.scm (ghc-tabular): Downgrade to 0.2.2.7.
---
gnu/packages/haskell-xyz.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (24 lines)
diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm
index d340df4a08..7f68b82fc1 100644
--- a/gnu/packages/haskell-xyz.scm
+++ b/gnu/packages/haskell-xyz.scm
@@ -13054,7 +13054,7 @@ increasing type safety.")
(define-public ghc-tabular
(package
(name "ghc-tabular")
- (version "0.2.2.8")
+ (version "0.2.2.7")
(source
(origin
(method url-fetch)
@@ -13064,7 +13064,7 @@ increasing type safety.")
".tar.gz"))
(sha256
(base32
- "0z936gh8n8i8qdkagyxwd9gqq13skd5fv013vdvwsibrxkm0czfb"))))
+ "1ysgq7rrks7f98nnvxil8xz1q27hxdgz4szbjhqwzbwd209dmy0k"))))
(build-system haskell-build-system)
(inputs
`(("ghc-csv" ,ghc-csv)
--
2.29.2
C
C
Carlo Holl wrote on 25 Nov 2020 21:16
[PATCH 2/6] gnu: ghc-doctest: Downgrade to 0.16.2.
(address . 44873@debbugs.gnu.org)(name . Carlo Holl)(address . carloholl@gmail.com)
20201125201638.2044-2-carloholl@gmail.com
* gnu/packages/haskell-xyz.scm (ghc-doctest): Downgrade to 0.16.2.
[inputs]: Replace with what is generated by guix import.
---
gnu/packages/haskell-xyz.scm | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

Toggle diff (32 lines)
diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm
index 7f68b82fc1..67395baea3 100644
--- a/gnu/packages/haskell-xyz.scm
+++ b/gnu/packages/haskell-xyz.scm
@@ -3551,7 +3551,7 @@ Writer monad), where list append quickly becomes too expensive.")
(define-public ghc-doctest
(package
(name "ghc-doctest")
- (version "0.16.3")
+ (version "0.16.2")
(source
(origin
(method url-fetch)
@@ -3561,7 +3561,7 @@ Writer monad), where list append quickly becomes too expensive.")
".tar.gz"))
(sha256
(base32
- "1y1l7aa80qkib1z8lsizgg7fpfdmdwhxvi5m255a42jdkjgn5sfg"))))
+ "0lk4cjfzi5bx2snfzw1zi06li0gvgz3ckfh2kwa98l7nxfdl39ag"))))
(build-system haskell-build-system)
(arguments `(#:tests? #f)) ; FIXME: missing test framework
(inputs
@@ -3573,7 +3573,6 @@ Writer monad), where list append quickly becomes too expensive.")
`(("ghc-hunit" ,ghc-hunit)
("ghc-quickcheck" ,ghc-quickcheck)
("ghc-hspec" ,ghc-hspec)
- ("ghc-hspec-core" ,ghc-hspec-core)
("ghc-mockery" ,ghc-mockery)
("ghc-setenv" ,ghc-setenv)
("ghc-silently" ,ghc-silently)
--
2.29.2
C
C
Carlo Holl wrote on 25 Nov 2020 21:16
[PATCH 4/6] gnu: ghc-hledger-lib: Downgrade to 0.14.1.
(address . 44873@debbugs.gnu.org)(name . Carlo Holl)(address . carloholl@gmail.com)
20201125201638.2044-4-carloholl@gmail.com
* gnu/packages/haskell-xyz.scm (ghc-hledger-lib): Downgrade to 0.14.1.
[inputs]: Replace with what is generated by guix import.
---
gnu/packages/haskell-xyz.scm | 22 ++++++++--------------
1 file changed, 8 insertions(+), 14 deletions(-)

Toggle diff (64 lines)
diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm
index 67395baea3..2e3fbbb5b0 100644
--- a/gnu/packages/haskell-xyz.scm
+++ b/gnu/packages/haskell-xyz.scm
@@ -5866,7 +5866,7 @@ accessed or modified.")
(define-public ghc-hledger-lib
(package
(name "ghc-hledger-lib")
- (version "1.19.1")
+ (version "1.14.1")
(source
(origin
(method url-fetch)
@@ -5876,14 +5876,10 @@ accessed or modified.")
".tar.gz"))
(sha256
(base32
- "0py11011r358nmnvwwkc8mlx6mpy36jm8sqlr4i8ihx3x0zjdgya"))))
+ "1w6qp01cak6spnpldm01czlm6i5a2alw47w76875l2nagrc4rfp2"))))
(build-system haskell-build-system)
(inputs
- `(("ghc-decimal" ,ghc-decimal)
- ("ghc-glob" ,ghc-glob)
- ("ghc-aeson" ,ghc-aeson)
- ("ghc-aeson-pretty" ,ghc-aeson-pretty)
- ("ghc-ansi-terminal" ,ghc-ansi-terminal)
+ `(("ghc-ansi-terminal" ,ghc-ansi-terminal)
("ghc-base-compat-batteries" ,ghc-base-compat-batteries)
("ghc-blaze-markup" ,ghc-blaze-markup)
("ghc-call-stack" ,ghc-call-stack)
@@ -5891,11 +5887,14 @@ accessed or modified.")
("ghc-cassava-megaparsec" ,ghc-cassava-megaparsec)
("ghc-cmdargs" ,ghc-cmdargs)
("ghc-data-default" ,ghc-data-default)
+ ("ghc-decimal" ,ghc-decimal)
+ ("ghc-easytest" ,ghc-easytest)
("ghc-extra" ,ghc-extra)
- ("ghc-fgl" ,ghc-fgl)
("ghc-file-embed" ,ghc-file-embed)
+ ("ghc-glob" ,ghc-glob)
("ghc-hashtables" ,ghc-hashtables)
("ghc-megaparsec" ,ghc-megaparsec)
+ ("ghc-mtl-compat" ,ghc-mtl-compat)
("ghc-old-time" ,ghc-old-time)
("ghc-parser-combinators" ,ghc-parser-combinators)
("ghc-pretty-show" ,ghc-pretty-show)
@@ -5903,14 +5902,9 @@ accessed or modified.")
("ghc-safe" ,ghc-safe)
("ghc-split" ,ghc-split)
("ghc-tabular" ,ghc-tabular)
- ("ghc-tasty" ,ghc-tasty)
- ("ghc-tasty-hunit" ,ghc-tasty-hunit)
- ("ghc-timeit" ,ghc-timeit)
("ghc-uglymemo" ,ghc-uglymemo)
- ("ghc-unordered-containers" ,ghc-unordered-containers)
("ghc-utf8-string" ,ghc-utf8-string)))
- (native-inputs
- `(("ghc-doctest" ,ghc-doctest)))
+ (native-inputs `(("ghc-doctest" ,ghc-doctest)))
(home-page "https://hledger.org")
(synopsis "Reusable library providing the core functionality of hledger")
(description
--
2.29.2
C
C
Carlo Holl wrote on 25 Nov 2020 21:16
[PATCH 3/6] gnu: Add ghc-easytest.
(address . 44873@debbugs.gnu.org)(name . Carlo Holl)(address . carloholl@gmail.com)
20201125201638.2044-3-carloholl@gmail.com
* gnu/packages/haskell-check.scm (ghc-easytest): New variable
---
gnu/packages/haskell-check.scm | 75 ++++++++++++++++++++++++++++++++++
1 file changed, 75 insertions(+)

Toggle diff (92 lines)
diff --git a/gnu/packages/haskell-check.scm b/gnu/packages/haskell-check.scm
index b5546f97f8..b61846f55f 100644
--- a/gnu/packages/haskell-check.scm
+++ b/gnu/packages/haskell-check.scm
@@ -12,6 +12,7 @@
;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
;;; Copyright © 2019 Timothy Sample <samplet@ngyro.com>
;;; Copyright © 2020 John Soo <jsoo1@asu.edu>
+;;; Copyright © 2020 Carlo Holl <carloholl@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -1038,3 +1039,77 @@ regular development cycle and regressions caught early.
See the documentation in \"Test.Inspection\" or the project webpage for more
examples and more information.")
(license license:expat)))
+
+(define-public ghc-easytest
+ (package
+ (name "ghc-easytest")
+ (version "0.2.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://hackage.haskell.org/package/easytest/easytest-"
+ version
+ ".tar.gz"))
+ (sha256
+ (base32
+ "0gdyawzlw6d15yz7ji599xjgfr0g7l1iq11ffr4aw3j6g3dc6m8i"))))
+ (build-system haskell-build-system)
+ (inputs
+ `(("ghc-async" ,ghc-async)
+ ("ghc-random" ,ghc-random)
+ ("ghc-call-stack" ,ghc-call-stack)))
+ (home-page "https://github.com/joelburget/easytest")
+ (synopsis "Simple, expressive testing library")
+ (description "EasyTest is a simple testing toolkit, meant to replace most
+uses of QuickCheck, SmallCheck, HUnit, and frameworks like Tasty, etc.
+Here's an example usage:
+
+@example
+
+module Main where
+
+import EasyTest
+import Control.Applicative
+import Control.Monad
+
+suite :: Test ()
+suite = tests
+ [ scope \"addition.ex1\" $ expect (1 + 1 == 2)
+ , scope \"addition.ex2\" $ expect (2 + 3 == 5)
+ , scope \"list.reversal\" . fork $ do
+ -- generate lists from size 0 to 10, of Ints in (0,43)
+ -- shorthand: listsOf [0..10] (int' 0 43)
+ ns <- [0..10] `forM` \\n -> replicateM n (int' 0 43)
+ ns `forM_` \\ns -> expect (reverse (reverse ns) == ns)
+ -- equivalent to `scope \"addition.ex3\"`
+ , scope \"addition\" . scope \"ex3\" $ expect (3 + 3 == 6)
+ , scope \"always passes\" $ do
+ note \"I'm running this test, even though it always passes!\"
+ ok -- like `pure ()`, but records a success result
+ , scope \"failing test\" $ crash \"oh noes!!\" ]
+
+-- NB: `run suite` would run all tests, but we only run
+-- tests whose scopes are prefixed by \"addition\"
+main = runOnly \"addition\" suite
+
+@end example
+
+This generates the output:
+
+@example
+
+Randomness seed for this run is 5104092164859451056
+Raw test output to follow ...
+------------------------------------------------------------
+OK addition.ex1
+OK addition.ex2
+OK addition.ex3
+------------------------------------------------------------
+3 tests passed, no failures!
+
+@end example
+
+The idea here is to write tests with ordinary Haskell code, with
+control flow explicit and under programmer control.")
+ (license license:expat)))
--
2.29.2
C
C
Carlo Holl wrote on 25 Nov 2020 21:16
[PATCH 5/6] gnu: hledger: Downgrade to 1.14.2.
(address . 44873@debbugs.gnu.org)(name . Carlo Holl)(address . carloholl@gmail.com)
20201125201638.2044-5-carloholl@gmail.com
* gnu/packages/finance.scm (hledger): Downgrade to 0.14.2.
[inputs,native-inputs]: Replace with what is generated by guix import.
---
gnu/packages/finance.scm | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)

Toggle diff (61 lines)
diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
index 7ef40f544f..dc62892e2a 100644
--- a/gnu/packages/finance.scm
+++ b/gnu/packages/finance.scm
@@ -186,7 +186,7 @@ line client and a client based on Qt.")
(define-public hledger
(package
(name "hledger")
- (version "1.19.1")
+ (version "1.14.2")
(source
(origin
(method url-fetch)
@@ -196,22 +196,22 @@ line client and a client based on Qt.")
".tar.gz"))
(sha256
(base32
- "0wfsyf2q1kf90mj3lxs0m5ghj153axmpkc8xfy12vkz5imnyphfm"))))
+ "1si9zqparkdq77yji87lhcsrf11fr3gisqwsv82cabhrhc36x6l4"))))
(build-system haskell-build-system)
(inputs
- `(("ghc-decimal" ,ghc-decimal)
- ("ghc-diff" ,ghc-diff)
- ("ghc-aeson" ,ghc-aeson)
- ("ghc-ansi-terminal" ,ghc-ansi-terminal)
+ `(("ghc-ansi-terminal" ,ghc-ansi-terminal)
("ghc-base-compat-batteries" ,ghc-base-compat-batteries)
("ghc-cmdargs" ,ghc-cmdargs)
("ghc-data-default" ,ghc-data-default)
- ("ghc-extra" ,ghc-extra)
+ ("ghc-decimal" ,ghc-decimal)
+ ("ghc-diff" ,ghc-diff)
+ ("ghc-easytest" ,ghc-easytest)
("ghc-hashable" ,ghc-hashable)
("ghc-hledger-lib" ,ghc-hledger-lib)
("ghc-lucid" ,ghc-lucid)
("ghc-math-functions" ,ghc-math-functions)
("ghc-megaparsec" ,ghc-megaparsec)
+ ("ghc-mtl-compat" ,ghc-mtl-compat)
("ghc-old-time" ,ghc-old-time)
("ghc-pretty-show" ,ghc-pretty-show)
("ghc-regex-tdfa" ,ghc-regex-tdfa)
@@ -219,13 +219,14 @@ line client and a client based on Qt.")
("ghc-shakespeare" ,ghc-shakespeare)
("ghc-split" ,ghc-split)
("ghc-tabular" ,ghc-tabular)
- ("ghc-tasty" ,ghc-tasty)
("ghc-temporary" ,ghc-temporary)
- ("ghc-timeit" ,ghc-timeit)
("ghc-unordered-containers" ,ghc-unordered-containers)
("ghc-utf8-string" ,ghc-utf8-string)
("ghc-utility-ht" ,ghc-utility-ht)
("ghc-wizards" ,ghc-wizards)))
+ (native-inputs
+ `(("ghc-test-framework" ,ghc-test-framework)
+ ("ghc-test-framework-hunit" ,ghc-test-framework-hunit)))
(home-page "https://hledger.org")
(synopsis "Command-line interface for the hledger accounting system")
(description
--
2.29.2
C
C
Carlo Holl wrote on 25 Nov 2020 21:16
[PATCH 6/6] gnu: ghc-cassava-megaparsec: Downgrade to 2.0.1.
(address . 44873@debbugs.gnu.org)(name . Carlo Holl)(address . carloholl@gmail.com)
20201125201638.2044-6-carloholl@gmail.com
* gnu/packages/haskell-xyz.scm (ghc-cassava-megaparsec): Downgrade to 2.0.1.
---
gnu/packages/haskell-xyz.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (24 lines)
diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm
index 2e3fbbb5b0..1655b88cb0 100644
--- a/gnu/packages/haskell-xyz.scm
+++ b/gnu/packages/haskell-xyz.scm
@@ -1663,7 +1663,7 @@ very simple example of encoding CSV data:
(define-public ghc-cassava-megaparsec
(package
(name "ghc-cassava-megaparsec")
- (version "2.0.2")
+ (version "2.0.1")
(source
(origin
(method url-fetch)
@@ -1674,7 +1674,7 @@ very simple example of encoding CSV data:
".tar.gz"))
(sha256
(base32
- "03x1462agrfdagklp8c89b8p4z2hd8nbf6d3895sz770zjkawda7"))))
+ "0q4skw98nzy6icmgpwqvgw0c5pqcgi25rf7nmwh2pksvv94pi3p3"))))
(build-system haskell-build-system)
(inputs
`(("ghc-cassava" ,ghc-cassava)
--
2.29.2
L
L
Leo Famulari wrote on 26 Nov 2020 03:07
Re: [bug#44873] [PATCH 0/6] Fix Haskell packages incompatible with latest LTSHaskell release.
(name . Carlo Holl)(address . carloholl@gmail.com)(address . 44873-done@debbugs.gnu.org)
20201126020700.GA10557@jasmine.lan
On Wed, Nov 25, 2020 at 12:10:32PM -0800, Carlo Holl wrote:
Toggle quote (2 lines)
> My recent contribution, pushed to master as e6bfb02eb79777b760031384d4a3c14239f7fb55 (bug#44174), introduced some haskell packages that are newer than the latest LTSHaskell release supported by Guix, as pointed out by Ricardo Wurmus. This patch series fixes that, representing a downgrade of several of the packages to versions matching the latest LTSHaskell release, as well as one package addition.

Thank you for following up! Pushed as
d482954c99720e5b166400d7b42204ddbf94412e with some cosmetic changes...

Toggle quote (2 lines)
> gnu: Add ghc-easytest.

For ghc-easytest, I removed so-called "marketing language" from the
synopsis and description [0], and also removed the usage example from
the description. It's nice to have examples but they belong in the
package's documentation rather than the Guix package description.

[0] The manual section Synopses and Descriptions talks about how to
handle the "marketing language":

Closed
C
C
Carlo Holl wrote on 26 Nov 2020 18:51
(name . Leo Famulari)(address . leo@famulari.name)(address . 44873-done@debbugs.gnu.org)
20201126175144.7f5kwct3gruyxyii@cehdev
Leo,

Toggle quote (10 lines)
>For ghc-easytest, I removed so-called "marketing language" from the
>synopsis and description [0], and also removed the usage example from
>the description. It's nice to have examples but they belong in the
>package's documentation rather than the Guix package description.
>
>[0] The manual section Synopses and Descriptions talks about how to
>handle the "marketing language":
>
>https://guix.gnu.org/manual/en/html_node/Synopses-and-Descriptions.html

I'm afraid I'm guilty of just doing the minimal work to format the text. I'll pay more attention to this next time.

Anyways, thanks for pushing.

Best,

Carlo Holl
carloholl@gmail.com
Closed
L
L
Leo Famulari wrote on 26 Nov 2020 19:53
(name . Carlo Holl)(address . carloholl@gmail.com)(address . 44873-done@debbugs.gnu.org)
X7/5pLUY/XdEjY7L@jasmine.lan
On Thu, Nov 26, 2020 at 09:51:44AM -0800, Carlo Holl wrote:
Toggle quote (14 lines)
> Leo,
>
> > For ghc-easytest, I removed so-called "marketing language" from the
> > synopsis and description [0], and also removed the usage example from
> > the description. It's nice to have examples but they belong in the
> > package's documentation rather than the Guix package description.
> >
> > [0] The manual section Synopses and Descriptions talks about how to
> > handle the "marketing language":
> >
> > https://guix.gnu.org/manual/en/html_node/Synopses-and-Descriptions.html
>
> I'm afraid I'm guilty of just doing the minimal work to format the text. I'll pay more attention to this next time.

Okay, don't worry about it too much! That's what review is for :)
Closed
?