[bug#34137,1/2] gnu: Add ghc-mtl.

Message ID 878szgv0tw.fsf@gmail.com
State Accepted
Headers show
Series [bug#34137,1/2] gnu: Add ghc-mtl. | expand

Checks

Context Check Description
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied

Commit Message

Gabriel Hondet Jan. 19, 2019, 8:34 p.m. UTC
* gnu/packages/haskell.scm (ghc-mtl): New variable.
---
 gnu/packages/haskell.scm | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

Comments

Timothy Sample Jan. 20, 2019, 4:26 p.m. UTC | #1
Hi Gabriel,

Gabriel Hondet <gabrielhondet@gmail.com> writes:

> * gnu/packages/haskell.scm (ghc-mtl): New variable.

Thank you very much for the patch!

GHC 8.4.3 has ghc-mtl built-in.  This means that we don’t need to have a
separate package for it.  We used to have a package for it, but it was
removed in commit f54f04756f6d90c9fb3b5e45f3947329287f9b05 as a part of
upgrading GHC.  We try to avoid having separate packages for Haskell
libraries that are built-in to GHC because they cause problems
(incompatibilities in the dependency graph).

You should be able to remove the “ghc-mtl” input from the MPD package
without any issue.

(Sadly, the importer is not clever enough to filter out built-in
libraries, so it has to be done manually.)

> [...]


-- Tim

Patch

diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
index a3ce2a3e4..97616d451 100644
--- a/gnu/packages/haskell.scm
+++ b/gnu/packages/haskell.scm
@@ -11405,4 +11405,29 @@  from a shell.  The @code{tldr} pages are a community effort to simplify the
 man pages with practical examples.")
     (license license:bsd-3)))
 
+(define-public ghc-mtl
+  (package
+    (name "ghc-mtl")
+    (version "1.2.1.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://hackage.haskell.org/package/ghc-mtl/ghc-mtl-"
+             version
+             ".tar.gz"))
+       (sha256
+        (base32
+         "0h6r6gip9nsjlsq88wj105hhqliy7ac2dmmndsfzbjz07b03cklk"))))
+    (build-system haskell-build-system)
+    (inputs
+     `(("ghc-exceptions" ,ghc-exceptions)
+       ("ghc-extensible-exceptions" ,ghc-extensible-exceptions)))
+    (home-page "https://hub.darcs.net/jcpetruzza/ghc-mtl")
+    (synopsis
+     "Mtl compatible version of the Ghc-Api monads and monad-transformers")
+    (description "Provides an @code{mtl} compatible version of the @code{GhcT}
+monad-transformer defined in the @code{GHC-API} since version 6.10.1.")
+    (license license:bsd-3)))
+
 ;;; haskell.scm ends here