guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#37717] [PATCH 1/3] gnu: Add ghc-atomic-primops.


From: Marius Bakke
Subject: [bug#37717] [PATCH 1/3] gnu: Add ghc-atomic-primops.
Date: Fri, 18 Oct 2019 20:23:22 +0200
User-agent: Notmuch/0.29.1 (https://notmuchmail.org) Emacs/26.2 (x86_64-pc-linux-gnu)

"Alex Griffin" <address@hidden> writes:

> From 77ff329dd34d307f19629086baf44c1623858fa1 Mon Sep 17 00:00:00 2001
> From: Alex Griffin <address@hidden>
> Date: Sat, 12 Oct 2019 13:34:43 -0500
> Subject: [PATCH 1/3] gnu: Add ghc-atomic-primops.
>
> * gnu/packages/haskell-xyz.scm (ghc-atomic-primops): New variable.

[...]

> diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm
> index 2977398880..37df2ed909 100644
> --- a/gnu/packages/haskell-xyz.scm
> +++ b/gnu/packages/haskell-xyz.scm
> @@ -381,6 +382,31 @@ over threads in Haskell, in which @code{Async a} is a 
> concurrent thread that
>  will eventually deliver a value of type @code{a}.")
>      (license license:bsd-3)))
>  
> +(define-public ghc-atomic-primops
> +  (package
> +    (name "ghc-atomic-primops")
> +    (version "0.8.3")

Note: we follow the Stackage LTS versions for GHC 7.4, currently 12.26.
So I think we should take version 0.8.2 instead:

https://www.stackage.org/lts-12.26/package/atomic-primops-0.8.2

(hopefully Timothy or someone can correct me if I'm wrong here)

> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri (string-append
> +             
> "https://hackage.haskell.org/package/atomic-primops/atomic-primops-";
> +             version
> +             ".tar.gz"))

Can you align these lines a bit?

> +       (sha256
> +        (base32
> +         "03n5dmyplrqgbyf8dr91izkxci7gkl3i3fnp82i5ld869zrgjfh0"))))
> +    (build-system haskell-build-system)
> +    (inputs `(("ghc-primitive" ,ghc-primitive)))
> +    (home-page "https://github.com/rrnewton/haskell-lockfree/wiki";)
> +    (synopsis "Safe approach to CAS and other atomic ops")
> +    (description
> +     "After GHC 7.4 a new @code{casMutVar#} primop became available, but it's
> +difficult to use safely, because pointer equality is a highly unstable 
> property
> +in Haskell.  This library provides a safer method based on the concept of
> +@code{Ticket}s.")

Can you try to adjust the first sentence so that it reads better?
Perhaps something along the lines of "GHC 7.4 introduced a new
@code{casMutVar#} PrimOp which is difficult to use safely, because ...".

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]