From 12ce5d31d19bd40f71b1f7b865fe32dbf5f0848f Mon Sep 17 00:00:00 2001 From: Timothy Sample Date: Sat, 22 Sep 2018 11:08:31 -0400 Subject: gnu: Add ghc-rio. * gnu/packages/haskell.scm (ghc-rio): New variable. --- gnu/packages/haskell.scm | 52 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm index 30f764339e..a0ca08720f 100644 --- a/gnu/packages/haskell.scm +++ b/gnu/packages/haskell.scm @@ -10556,4 +10556,56 @@ (define-public ghc-wcwidth-bootstrap ("ghc-attoparsec" ,ghc-attoparsec-bootstrap))) (properties '(hidden? #t)))) +(define-public ghc-rio + (package + (name "ghc-rio") + (version "0.1.5.0") + (source + (origin + (method url-fetch) + (uri (string-append + "https://hackage.haskell.org/package/rio/rio-" + version ".tar.gz")) + (sha256 + (base32 + "064h8a4hp53a479d3ak0vmqbx8hi0cpg7zn4wp23rjy26dka8p7g")))) + (build-system haskell-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'add-setup-script + (lambda _ + ;; The usual "Setup.hs" script is missing from the source. + (with-output-to-file "Setup.hs" + (lambda () + (format #t "import Distribution.Simple~%") + (format #t "main = defaultMain~%")))))))) + (inputs + `(("ghc-exceptions" ,ghc-exceptions) + ("ghc-hashable" ,ghc-hashable) + ("ghc-microlens" ,ghc-microlens) + ("ghc-primitive" ,ghc-primitive) + ("ghc-text" ,ghc-text) + ("ghc-typed-process" ,ghc-typed-process) + ("ghc-unliftio" ,ghc-unliftio) + ("ghc-unordered-containers" ,ghc-unordered-containers) + ("ghc-vector" ,ghc-vector))) + (native-inputs + `(("ghc-hspec" ,ghc-hspec) + ("hspec-discover" ,hspec-discover))) + (home-page "https://github.com/commercialhaskell/rio#readme") + (synopsis "A standard library for Haskell") + (description "This package works as a prelude replacement for Haskell, +providing more functionality and types out of the box than the standard +prelude (such as common data types like @code{ByteString} and +@code{Text}), as well as removing common ``gotchas'', like partial +functions and lazy I/O. The guiding principle here is: +@itemize +@item If something is safe to use in general and has no expected naming +conflicts, expose it. +@item If something should not always be used, or has naming conflicts, +expose it from another module in the hierarchy. +@end itemize") + (license license:expat))) + ;;; haskell.scm ends here -- cgit v1.2.3