From e9f914e9af030ca65fb2cb1c21892307b1dc0d2e Mon Sep 17 00:00:00 2001 From: John Soo Date: Sun, 7 Jul 2019 17:27:42 -0700 Subject: [PATCH 02/13] gnu: Add ghc-unsafe. --- gnu/packages/haskell.scm | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm index 6e62c2dd90..0096ed76c0 100644 --- a/gnu/packages/haskell.scm +++ b/gnu/packages/haskell.scm @@ -2857,6 +2857,41 @@ package. This package re-exports the unix package when available. When it isn't available, portable implementations are used.") (license license:bsd-3))) +(define-public ghc-unsafe + (package + (name "ghc-unsafe") + (version "0.0") + (source + (origin + (method url-fetch) + (uri + (string-append + "https://hackage.haskell.org/package/unsafe/unsafe-" + version ".tar.gz")) + (sha256 + (base32 + "0hc6xr1i3hkz25gdgfx1jqgpsc9mwa05bkfynp0mcfdlyz6782nz")))) + (build-system haskell-build-system) + (arguments `(#:tests? #f)) + (home-page "https://hackage.haskell.org/package/unsafe") + (synopsis "Unified interface to unsafe functions") + (description + "SafeHaskell introduced the notion of safe and unsafe modules. In order to +make as many as possible modules \\\"safe\\\", the well-known unsafe functions +were moved to distinguished modules. This makes it hard to write packages that +work with both old and new versions of GHC. This package provides a single +module System.Unsafe that exports the unsafe functions from the base package. +It provides them in a style ready for qualification, that is, you should import +them by + +import qualified System.Unsafe as Unsafe + +The package also contains a script called rename-unsafe.sh. It replaces all +occurrences of the original identifiers with the qualified identifiers from this +package. You still have to adapt the import commands. It uses the +darcs-replace-rec script from the darcs-scripts package.") + (license license:bsd-3))) + (define-public ghc-indents (package (name "ghc-indents") -- 2.22.0