From 5cfdd0a80b094335af673fac7d472ca291445f86 Mon Sep 17 00:00:00 2001 From: John Soo Date: Sun, 7 Jul 2019 17:27:42 -0700 Subject: [PATCH 01/12] gnu: Add ghc-unsafe. * gnu/packages/haskell.scm (ghc-unsafe): New variable. --- gnu/packages/haskell.scm | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm index 8787f10789..fe762a2a9a 100644 --- a/gnu/packages/haskell.scm +++ b/gnu/packages/haskell.scm @@ -19,6 +19,7 @@ ;;; Copyright © 2018, 2019 Gabriel Hondet ;;; Copyright © 2019 Robert Vollmert ;;; Copyright © 2019 Jacob MacDonald +;;; Copyright © 2019 John Soo ;;; ;;; This file is part of GNU Guix. ;;; @@ -2781,6 +2782,40 @@ 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) + (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