GNU bug report logs - #58898
[PATCH] gnu: Add carp.

Previous Next

Package: guix-patches;

Reported by: jgart <jgart <at> dismail.de>

Date: Sun, 30 Oct 2022 16:03:02 UTC

Severity: normal

Tags: patch

Done: Raghav Gururajan <rg <at> raghavgururajan.name>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 58898 in the body.
You can then email your comments to 58898 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#58898; Package guix-patches. (Sun, 30 Oct 2022 16:03:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to jgart <jgart <at> dismail.de>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sun, 30 Oct 2022 16:03:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: jgart <jgart <at> dismail.de>
To: guix-patches <at> gnu.org
Cc: jgart <jgart <at> dismail.de>
Subject: [PATCH] gnu: Add carp.
Date: Sun, 30 Oct 2022 11:02:24 -0500
* gnu/packages/lisp.scm (carp): New variable.
---
 gnu/packages/lisp.scm | 57 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 57 insertions(+)

diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm
index 4899943ba8..8957cc49fc 100644
--- a/gnu/packages/lisp.scm
+++ b/gnu/packages/lisp.scm
@@ -55,6 +55,7 @@ (define-module (gnu packages lisp)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system ant)
   #:use-module (guix build-system asdf)
+  #:use-module (guix build-system haskell)
   #:use-module (guix build-system trivial)
   #:use-module (gnu packages admin)
   #:use-module (gnu packages base)
@@ -71,10 +72,14 @@ (define-module (gnu packages lisp)
   #:use-module (gnu packages gl)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages groff)
+  #:use-module (gnu packages haskell-check)
+  #:use-module (gnu packages haskell-web)
+  #:use-module (gnu packages haskell-xyz)
   #:use-module (gnu packages libffcall)
   #:use-module (gnu packages libffi)
   #:use-module (gnu packages libsigsegv)
   #:use-module (gnu packages linux)
+  #:use-module (gnu packages llvm)
   #:use-module (gnu packages m4)
   #:use-module (gnu packages maths)
   #:use-module (gnu packages multiprecision)
@@ -1268,6 +1273,58 @@ (define-public janet
 assembler, PEG) is less than 1MB.")
     (license license:expat)))
 
+(define-public carp
+  (package
+    (name "carp")
+    (version "0.5.5")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/carp-lang/Carp")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "14jdnv0ljqvpr9ych1plfw7hp5q57a8j1bv8h3v345x06z783d07"))))
+    (build-system haskell-build-system)
+    (arguments
+      `(#:phases
+         (modify-phases %standard-phases
+           ;; Carp looks inside the sources checkout to know where to
+           ;; find its core libraries and other files.
+           ;; Carp emits C code and tries to compile it with an external
+           ;; C compiler. On Linux it defaults to clang.
+           (add-after 'install 'set-carp-dir-and-path
+             (lambda* (#:key inputs outputs #:allow-other-keys)
+               (let ((out (assoc-ref outputs "out"))
+                     (sources (assoc-ref inputs "source"))
+                     (clang (assoc-ref inputs "clang")))
+                 (wrap-program (string-append out "/bin/carp")
+                   `("CARP_DIR" = (,sources))
+                   `("PATH" = (,(string-append clang "/bin"))))
+                 (wrap-program (string-append out "/bin/carp-header-parse")
+                   `("CARP_DIR" = (,sources))
+                   `("PATH" = (,(string-append clang "/bin"))))))))))
+    (native-inputs (list ghc-hunit))
+    (inputs (list bash-minimal
+                  clang
+                  ghc-blaze-markup
+                  ghc-blaze-html
+                  ghc-split
+                  ghc-ansi-terminal
+                  ghc-cmark
+                  ghc-edit-distance
+                  ghc-hashable
+                  ghc-open-browser
+                  ghc-optparse-applicative))
+    (home-page "https://carp-lang.org/")
+    (synopsis "Statically typed Lisp without a garbage collector")
+    (description
+"@code{carp} is a programming language designed to work well for
+interactive and performance sensitive use cases like games, sound
+synthesis and visualizations.")
+    (license license:asl2.0)))
+
 (define-public lisp-repl-core-dumper
   (package
     (name "lisp-repl-core-dumper")
-- 
2.38.1





Information forwarded to guix-patches <at> gnu.org:
bug#58898; Package guix-patches. (Sun, 30 Oct 2022 16:17:02 GMT) Full text and rfc822 format available.

Message #8 received at 58898 <at> debbugs.gnu.org (full text, mbox):

From: jgart <jgart <at> dismail.de>
To: 58898 <at> debbugs.gnu.org
Cc: jgart <jgart <at> dismail.de>
Subject: [PATCH v2] gnu: Add carp.
Date: Sun, 30 Oct 2022 11:15:40 -0500
* gnu/packages/lisp.scm (carp): New variable.

v2 just removes the unused out variable and capitalizes Clang in the comment.

all best,

jgart
---
 gnu/packages/lisp.scm | 56 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 56 insertions(+)

diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm
index 4899943ba8..763219fff6 100644
--- a/gnu/packages/lisp.scm
+++ b/gnu/packages/lisp.scm
@@ -55,6 +55,7 @@ (define-module (gnu packages lisp)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system ant)
   #:use-module (guix build-system asdf)
+  #:use-module (guix build-system haskell)
   #:use-module (guix build-system trivial)
   #:use-module (gnu packages admin)
   #:use-module (gnu packages base)
@@ -71,10 +72,14 @@ (define-module (gnu packages lisp)
   #:use-module (gnu packages gl)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages groff)
+  #:use-module (gnu packages haskell-check)
+  #:use-module (gnu packages haskell-web)
+  #:use-module (gnu packages haskell-xyz)
   #:use-module (gnu packages libffcall)
   #:use-module (gnu packages libffi)
   #:use-module (gnu packages libsigsegv)
   #:use-module (gnu packages linux)
+  #:use-module (gnu packages llvm)
   #:use-module (gnu packages m4)
   #:use-module (gnu packages maths)
   #:use-module (gnu packages multiprecision)
@@ -1268,6 +1273,57 @@ (define-public janet
 assembler, PEG) is less than 1MB.")
     (license license:expat)))
 
+(define-public carp
+  (package
+    (name "carp")
+    (version "0.5.5")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/carp-lang/Carp")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "14jdnv0ljqvpr9ych1plfw7hp5q57a8j1bv8h3v345x06z783d07"))))
+    (build-system haskell-build-system)
+    (arguments
+      `(#:phases
+         (modify-phases %standard-phases
+           ;; Carp looks inside the sources checkout to know where to
+           ;; find its core libraries and other files.
+           ;; Carp emits C code and tries to compile it with an external
+           ;; C compiler. On Linux it defaults to Clang.
+           (add-after 'install 'set-carp-dir-and-path
+             (lambda* (#:key inputs outputs #:allow-other-keys)
+               (let ((sources (assoc-ref inputs "source"))
+                     (clang (assoc-ref inputs "clang")))
+                 (wrap-program (string-append out "/bin/carp")
+                   `("CARP_DIR" = (,sources))
+                   `("PATH" = (,(string-append clang "/bin"))))
+                 (wrap-program (string-append out "/bin/carp-header-parse")
+                   `("CARP_DIR" = (,sources))
+                   `("PATH" = (,(string-append clang "/bin"))))))))))
+    (native-inputs (list ghc-hunit))
+    (inputs (list bash-minimal
+                  clang
+                  ghc-blaze-markup
+                  ghc-blaze-html
+                  ghc-split
+                  ghc-ansi-terminal
+                  ghc-cmark
+                  ghc-edit-distance
+                  ghc-hashable
+                  ghc-open-browser
+                  ghc-optparse-applicative))
+    (home-page "https://carp-lang.org/")
+    (synopsis "Statically typed Lisp without a garbage collector")
+    (description
+"@code{carp} is a programming language designed to work well for
+interactive and performance sensitive use cases like games, sound
+synthesis and visualizations.")
+    (license license:asl2.0)))
+
 (define-public lisp-repl-core-dumper
   (package
     (name "lisp-repl-core-dumper")
-- 
2.38.1





Information forwarded to guix-patches <at> gnu.org:
bug#58898; Package guix-patches. (Sun, 30 Oct 2022 16:24:01 GMT) Full text and rfc822 format available.

Message #11 received at 58898 <at> debbugs.gnu.org (full text, mbox):

From: jgart <jgart <at> dismail.de>
To: 58898 <at> debbugs.gnu.org
Cc: jgart <jgart <at> dismail.de>
Subject: [PATCH v3] gnu: Add carp.
Date: Sun, 30 Oct 2022 11:22:18 -0500
* gnu/packages/lisp.scm (carp): New variable.

v3: oops silly me out was being used...
---
 gnu/packages/lisp.scm | 56 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 56 insertions(+)

diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm
index 4899943ba8..763219fff6 100644
--- a/gnu/packages/lisp.scm
+++ b/gnu/packages/lisp.scm
@@ -55,6 +55,7 @@ (define-module (gnu packages lisp)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system ant)
   #:use-module (guix build-system asdf)
+  #:use-module (guix build-system haskell)
   #:use-module (guix build-system trivial)
   #:use-module (gnu packages admin)
   #:use-module (gnu packages base)
@@ -71,10 +72,14 @@ (define-module (gnu packages lisp)
   #:use-module (gnu packages gl)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages groff)
+  #:use-module (gnu packages haskell-check)
+  #:use-module (gnu packages haskell-web)
+  #:use-module (gnu packages haskell-xyz)
   #:use-module (gnu packages libffcall)
   #:use-module (gnu packages libffi)
   #:use-module (gnu packages libsigsegv)
   #:use-module (gnu packages linux)
+  #:use-module (gnu packages llvm)
   #:use-module (gnu packages m4)
   #:use-module (gnu packages maths)
   #:use-module (gnu packages multiprecision)
@@ -1268,6 +1273,57 @@ (define-public janet
 assembler, PEG) is less than 1MB.")
     (license license:expat)))
 
+(define-public carp
+  (package
+    (name "carp")
+    (version "0.5.5")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/carp-lang/Carp")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "14jdnv0ljqvpr9ych1plfw7hp5q57a8j1bv8h3v345x06z783d07"))))
+    (build-system haskell-build-system)
+    (arguments
+      `(#:phases
+         (modify-phases %standard-phases
+           ;; Carp looks inside the sources checkout to know where to
+           ;; find its core libraries and other files.
+           ;; Carp emits C code and tries to compile it with an external
+           ;; C compiler. On Linux it defaults to Clang.
+           (add-after 'install 'set-carp-dir-and-path
+             (lambda* (#:key inputs outputs #:allow-other-keys)
+               (let ((sources (assoc-ref inputs "source"))
+                     (clang (assoc-ref inputs "clang")))
+                 (wrap-program (string-append out "/bin/carp")
+                   `("CARP_DIR" = (,sources))
+                   `("PATH" = (,(string-append clang "/bin"))))
+                 (wrap-program (string-append out "/bin/carp-header-parse")
+                   `("CARP_DIR" = (,sources))
+                   `("PATH" = (,(string-append clang "/bin"))))))))))
+    (native-inputs (list ghc-hunit))
+    (inputs (list bash-minimal
+                  clang
+                  ghc-blaze-markup
+                  ghc-blaze-html
+                  ghc-split
+                  ghc-ansi-terminal
+                  ghc-cmark
+                  ghc-edit-distance
+                  ghc-hashable
+                  ghc-open-browser
+                  ghc-optparse-applicative))
+    (home-page "https://carp-lang.org/")
+    (synopsis "Statically typed Lisp without a garbage collector")
+    (description
+"@code{carp} is a programming language designed to work well for
+interactive and performance sensitive use cases like games, sound
+synthesis and visualizations.")
+    (license license:asl2.0)))
+
 (define-public lisp-repl-core-dumper
   (package
     (name "lisp-repl-core-dumper")
-- 
2.38.1





Information forwarded to guix-patches <at> gnu.org:
bug#58898; Package guix-patches. (Sun, 30 Oct 2022 16:32:02 GMT) Full text and rfc822 format available.

Message #14 received at 58898 <at> debbugs.gnu.org (full text, mbox):

From: jgart <jgart <at> dismail.de>
To: 58898 <at> debbugs.gnu.org
Cc: jgart <jgart <at> dismail.de>
Subject: [PATCH v4] gnu: Add carp.
Date: Sun, 30 Oct 2022 11:30:25 -0500
* gnu/packages/lisp.scm (carp): New variable.

here's v4. v3 fails ;()
---
 gnu/packages/lisp.scm | 57 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 57 insertions(+)

diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm
index 4899943ba8..c7ba84c771 100644
--- a/gnu/packages/lisp.scm
+++ b/gnu/packages/lisp.scm
@@ -55,6 +55,7 @@ (define-module (gnu packages lisp)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system ant)
   #:use-module (guix build-system asdf)
+  #:use-module (guix build-system haskell)
   #:use-module (guix build-system trivial)
   #:use-module (gnu packages admin)
   #:use-module (gnu packages base)
@@ -71,10 +72,14 @@ (define-module (gnu packages lisp)
   #:use-module (gnu packages gl)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages groff)
+  #:use-module (gnu packages haskell-check)
+  #:use-module (gnu packages haskell-web)
+  #:use-module (gnu packages haskell-xyz)
   #:use-module (gnu packages libffcall)
   #:use-module (gnu packages libffi)
   #:use-module (gnu packages libsigsegv)
   #:use-module (gnu packages linux)
+  #:use-module (gnu packages llvm)
   #:use-module (gnu packages m4)
   #:use-module (gnu packages maths)
   #:use-module (gnu packages multiprecision)
@@ -1268,6 +1273,58 @@ (define-public janet
 assembler, PEG) is less than 1MB.")
     (license license:expat)))
 
+(define-public carp
+  (package
+    (name "carp")
+    (version "0.5.5")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/carp-lang/Carp")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "14jdnv0ljqvpr9ych1plfw7hp5q57a8j1bv8h3v345x06z783d07"))))
+    (build-system haskell-build-system)
+    (arguments
+      `(#:phases
+         (modify-phases %standard-phases
+           ;; Carp looks inside the sources checkout to know where to
+           ;; find its core libraries and other files.
+           ;; Carp emits C code and tries to compile it with an external
+           ;; C compiler. On Linux it defaults to Clang.
+           (add-after 'install 'set-carp-dir-and-path
+             (lambda* (#:key inputs outputs #:allow-other-keys)
+               (let ((out (assoc-ref outputs "out"))
+                     (sources (assoc-ref inputs "source"))
+                     (clang (assoc-ref inputs "clang")))
+                 (wrap-program (string-append out "/bin/carp")
+                   `("CARP_DIR" = (,sources))
+                   `("PATH" = (,(string-append clang "/bin"))))
+                 (wrap-program (string-append out "/bin/carp-header-parse")
+                   `("CARP_DIR" = (,sources))
+                   `("PATH" = (,(string-append clang "/bin"))))))))))
+    (native-inputs (list ghc-hunit))
+    (inputs (list bash-minimal
+                  clang
+                  ghc-blaze-markup
+                  ghc-blaze-html
+                  ghc-split
+                  ghc-ansi-terminal
+                  ghc-cmark
+                  ghc-edit-distance
+                  ghc-hashable
+                  ghc-open-browser
+                  ghc-optparse-applicative))
+    (home-page "https://carp-lang.org/")
+    (synopsis "Statically typed Lisp without a garbage collector")
+    (description
+"@code{carp} is a programming language designed to work well for
+interactive and performance sensitive use cases like games, sound
+synthesis and visualizations.")
+    (license license:asl2.0)))
+
 (define-public lisp-repl-core-dumper
   (package
     (name "lisp-repl-core-dumper")
-- 
2.38.1





Information forwarded to guix-patches <at> gnu.org:
bug#58898; Package guix-patches. (Sun, 30 Oct 2022 17:21:02 GMT) Full text and rfc822 format available.

Message #17 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Christine Lemmer-Webber <cwebber <at> dustycloud.org>
To: jgart <jgart <at> dismail.de>
Cc: 58898 <at> debbugs.gnu.org, guix-patches <at> gnu.org
Subject: Re: [bug#58898] [PATCH v4] gnu: Add carp.
Date: Sun, 30 Oct 2022 13:18:22 -0400
Thanks!  It does compile and install.  I haven't figured out to how to
use it meaningfully though... 

Here's what happens to me:

cwebber <at> chicory:~/devel/guix$ carp
Welcome to Carp 0.5.5
This is free software with ABSOLUTELY NO WARRANTY.
Evaluate (help) for more information.
> (defn double [x]
    (* x 2))
(> 
> (double 2)
In file included from out/main.c:20:
/gnu/store/0xhn0vyjlcb2dv1h2333vhbj7j1vvrr6-carp-0.5.5-checkout/core/carp_long.h:90:5: error: 
      implicit declaration of function 'srand' is invalid in C99
      [-Werror,-Wimplicit-function-declaration]
    srand(seed);
    ^
/gnu/store/0xhn0vyjlcb2dv1h2333vhbj7j1vvrr6-carp-0.5.5-checkout/core/carp_long.h:90:5: note: 
      did you mean 'rand'?
/home/cwebber/.guix-profile/include/stdlib.h:52:5: note: 'rand' declared here
int rand (void);
    ^
In file included from out/main.c:21:
/gnu/store/0xhn0vyjlcb2dv1h2333vhbj7j1vvrr6-carp-0.5.5-checkout/core/carp_double.h:1:29: error: 
      use of undeclared identifier 'DBL_MAX'
const double CARP_DBL_MAX = DBL_MAX;
                            ^
/gnu/store/0xhn0vyjlcb2dv1h2333vhbj7j1vvrr6-carp-0.5.5-checkout/core/carp_double.h:68:12: error: 
      implicitly declaring library function 'acos' with type 'double (double)'
      [-Werror,-Wimplicit-function-declaration]
    return acos(x);
           ^
/gnu/store/0xhn0vyjlcb2dv1h2333vhbj7j1vvrr6-carp-0.5.5-checkout/core/carp_double.h:68:12: note: 
      include the header <math.h> or explicitly provide a declaration for 'acos'
/gnu/store/0xhn0vyjlcb2dv1h2333vhbj7j1vvrr6-carp-0.5.5-checkout/core/carp_double.h:72:12: error: 
      implicitly declaring library function 'asin' with type 'double (double)'
      [-Werror,-Wimplicit-function-declaration]
    return asin(x);
           ^
/gnu/store/0xhn0vyjlcb2dv1h2333vhbj7j1vvrr6-carp-0.5.5-checkout/core/carp_double.h:72:12: note: 
      include the header <math.h> or explicitly provide a declaration for 'asin'
/gnu/store/0xhn0vyjlcb2dv1h2333vhbj7j1vvrr6-carp-0.5.5-checkout/core/carp_double.h:76:12: error: 
      implicitly declaring library function 'atan' with type 'double (double)'
      [-Werror,-Wimplicit-function-declaration]
    return atan(x);
           ^
/gnu/store/0xhn0vyjlcb2dv1h2333vhbj7j1vvrr6-carp-0.5.5-checkout/core/carp_double.h:76:12: note: 
      include the header <math.h> or explicitly provide a declaration for 'atan'
/gnu/store/0xhn0vyjlcb2dv1h2333vhbj7j1vvrr6-carp-0.5.5-checkout/core/carp_double.h:88:12: error: 
      implicitly declaring library function 'cosh' with type 'double (double)'
      [-Werror,-Wimplicit-function-declaration]
    return cosh(x);
           ^
/gnu/store/0xhn0vyjlcb2dv1h2333vhbj7j1vvrr6-carp-0.5.5-checkout/core/carp_double.h:88:12: note: 
      include the header <math.h> or explicitly provide a declaration for 'cosh'
/gnu/store/0xhn0vyjlcb2dv1h2333vhbj7j1vvrr6-carp-0.5.5-checkout/core/carp_double.h:96:12: error: 
      implicitly declaring library function 'sinh' with type 'double (double)'
      [-Werror,-Wimplicit-function-declaration]
    return sinh(x);
           ^
/gnu/store/0xhn0vyjlcb2dv1h2333vhbj7j1vvrr6-carp-0.5.5-checkout/core/carp_double.h:96:12: note: 
      include the header <math.h> or explicitly provide a declaration for 'sinh'
/gnu/store/0xhn0vyjlcb2dv1h2333vhbj7j1vvrr6-carp-0.5.5-checkout/core/carp_double.h:100:12: error: 
      implicitly declaring library function 'tanh' with type 'double (double)'
      [-Werror,-Wimplicit-function-declaration]
    return tanh(x);
           ^
/gnu/store/0xhn0vyjlcb2dv1h2333vhbj7j1vvrr6-carp-0.5.5-checkout/core/carp_double.h:100:12: note: 
      include the header <math.h> or explicitly provide a declaration for 'tanh'
/gnu/store/0xhn0vyjlcb2dv1h2333vhbj7j1vvrr6-carp-0.5.5-checkout/core/carp_double.h:108:12: error: 
      implicitly declaring library function 'frexp' with type 'double (double, int *)'
      [-Werror,-Wimplicit-function-declaration]
    return frexp(x, exponent);
           ^
/gnu/store/0xhn0vyjlcb2dv1h2333vhbj7j1vvrr6-carp-0.5.5-checkout/core/carp_double.h:108:12: note: 
      include the header <math.h> or explicitly provide a declaration for 'frexp'
/gnu/store/0xhn0vyjlcb2dv1h2333vhbj7j1vvrr6-carp-0.5.5-checkout/core/carp_double.h:120:12: error: 
      implicitly declaring library function 'log10' with type 'double (double)'
      [-Werror,-Wimplicit-function-declaration]
    return log10(x);
           ^
/gnu/store/0xhn0vyjlcb2dv1h2333vhbj7j1vvrr6-carp-0.5.5-checkout/core/carp_double.h:120:12: note: 
      include the header <math.h> or explicitly provide a declaration for 'log10'
/gnu/store/0xhn0vyjlcb2dv1h2333vhbj7j1vvrr6-carp-0.5.5-checkout/core/carp_double.h:144:12: error: 
      implicitly declaring library function 'fmod' with type 'double (double, double)'
      [-Werror,-Wimplicit-function-declaration]
    return fmod(x, y);
           ^
/gnu/store/0xhn0vyjlcb2dv1h2333vhbj7j1vvrr6-carp-0.5.5-checkout/core/carp_double.h:144:12: note: 
      include the header <math.h> or explicitly provide a declaration for 'fmod'
In file included from out/main.c:22:
/gnu/store/0xhn0vyjlcb2dv1h2333vhbj7j1vvrr6-carp-0.5.5-checkout/core/carp_float.h:1:28: error: 
      use of undeclared identifier 'FLT_MAX'
const float CARP_FLT_MAX = FLT_MAX;
                           ^
/gnu/store/0xhn0vyjlcb2dv1h2333vhbj7j1vvrr6-carp-0.5.5-checkout/core/carp_float.h:47:12: error: 
      implicitly declaring library function 'fabsf' with type 'float (float)'
      [-Werror,-Wimplicit-function-declaration]
    return fabsf(x);
           ^
/gnu/store/0xhn0vyjlcb2dv1h2333vhbj7j1vvrr6-carp-0.5.5-checkout/core/carp_float.h:47:12: note: 
      include the header <math.h> or explicitly provide a declaration for 'fabsf'
/gnu/store/0xhn0vyjlcb2dv1h2333vhbj7j1vvrr6-carp-0.5.5-checkout/core/carp_float.h:51:12: error: 
      implicitly declaring library function 'acosf' with type 'float (float)'
      [-Werror,-Wimplicit-function-declaration]
    return acosf(x);
           ^
/gnu/store/0xhn0vyjlcb2dv1h2333vhbj7j1vvrr6-carp-0.5.5-checkout/core/carp_float.h:51:12: note: 
      include the header <math.h> or explicitly provide a declaration for 'acosf'
/gnu/store/0xhn0vyjlcb2dv1h2333vhbj7j1vvrr6-carp-0.5.5-checkout/core/carp_float.h:55:12: error: 
      implicitly declaring library function 'asinf' with type 'float (float)'
      [-Werror,-Wimplicit-function-declaration]
    return asinf(x);
           ^
/gnu/store/0xhn0vyjlcb2dv1h2333vhbj7j1vvrr6-carp-0.5.5-checkout/core/carp_float.h:55:12: note: 
      include the header <math.h> or explicitly provide a declaration for 'asinf'
/gnu/store/0xhn0vyjlcb2dv1h2333vhbj7j1vvrr6-carp-0.5.5-checkout/core/carp_float.h:59:12: error: 
      implicitly declaring library function 'atanf' with type 'float (float)'
      [-Werror,-Wimplicit-function-declaration]
    return atanf(x);
           ^
/gnu/store/0xhn0vyjlcb2dv1h2333vhbj7j1vvrr6-carp-0.5.5-checkout/core/carp_float.h:59:12: note: 
      include the header <math.h> or explicitly provide a declaration for 'atanf'
/gnu/store/0xhn0vyjlcb2dv1h2333vhbj7j1vvrr6-carp-0.5.5-checkout/core/carp_float.h:63:12: error: 
      implicitly declaring library function 'atan2f' with type 'float (float, float)'
      [-Werror,-Wimplicit-function-declaration]
    return atan2f(y, x);
           ^
/gnu/store/0xhn0vyjlcb2dv1h2333vhbj7j1vvrr6-carp-0.5.5-checkout/core/carp_float.h:63:12: note: 
      include the header <math.h> or explicitly provide a declaration for 'atan2f'
/gnu/store/0xhn0vyjlcb2dv1h2333vhbj7j1vvrr6-carp-0.5.5-checkout/core/carp_float.h:67:12: error: 
      implicitly declaring library function 'cosf' with type 'float (float)'
      [-Werror,-Wimplicit-function-declaration]
    return cosf(x);
           ^
/gnu/store/0xhn0vyjlcb2dv1h2333vhbj7j1vvrr6-carp-0.5.5-checkout/core/carp_float.h:67:12: note: 
      include the header <math.h> or explicitly provide a declaration for 'cosf'
/gnu/store/0xhn0vyjlcb2dv1h2333vhbj7j1vvrr6-carp-0.5.5-checkout/core/carp_float.h:71:12: error: 
      implicitly declaring library function 'coshf' with type 'float (float)'
      [-Werror,-Wimplicit-function-declaration]
    return coshf(x);
           ^
/gnu/store/0xhn0vyjlcb2dv1h2333vhbj7j1vvrr6-carp-0.5.5-checkout/core/carp_float.h:71:12: note: 
      include the header <math.h> or explicitly provide a declaration for 'coshf'
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
carp: callCommand: clang  -o out/Untitled -I /gnu/store/0xhn0vyjlcb2dv1h2333vhbj7j1vvrr6-carp-0.5.5-checkout/core/  -fPIC -g -std=c99 -D_DEFAULT_SOURCE -Wall -Werror -Wno-unused-variable -Wno-self-assign -lm out/main.c (exit 1): failed

Have you had any better luck?

jgart via Guix-patches via <guix-patches <at> gnu.org> writes:

> * gnu/packages/lisp.scm (carp): New variable.
>
> here's v4. v3 fails ;()
> ---
>  gnu/packages/lisp.scm | 57 +++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 57 insertions(+)
>
> diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm
> index 4899943ba8..c7ba84c771 100644
> --- a/gnu/packages/lisp.scm
> +++ b/gnu/packages/lisp.scm
> @@ -55,6 +55,7 @@ (define-module (gnu packages lisp)
>    #:use-module (guix build-system gnu)
>    #:use-module (guix build-system ant)
>    #:use-module (guix build-system asdf)
> +  #:use-module (guix build-system haskell)
>    #:use-module (guix build-system trivial)
>    #:use-module (gnu packages admin)
>    #:use-module (gnu packages base)
> @@ -71,10 +72,14 @@ (define-module (gnu packages lisp)
>    #:use-module (gnu packages gl)
>    #:use-module (gnu packages glib)
>    #:use-module (gnu packages groff)
> +  #:use-module (gnu packages haskell-check)
> +  #:use-module (gnu packages haskell-web)
> +  #:use-module (gnu packages haskell-xyz)
>    #:use-module (gnu packages libffcall)
>    #:use-module (gnu packages libffi)
>    #:use-module (gnu packages libsigsegv)
>    #:use-module (gnu packages linux)
> +  #:use-module (gnu packages llvm)
>    #:use-module (gnu packages m4)
>    #:use-module (gnu packages maths)
>    #:use-module (gnu packages multiprecision)
> @@ -1268,6 +1273,58 @@ (define-public janet
>  assembler, PEG) is less than 1MB.")
>      (license license:expat)))
>  
> +(define-public carp
> +  (package
> +    (name "carp")
> +    (version "0.5.5")
> +    (source
> +     (origin
> +       (method git-fetch)
> +       (uri (git-reference
> +             (url "https://github.com/carp-lang/Carp")
> +             (commit (string-append "v" version))))
> +       (file-name (git-file-name name version))
> +       (sha256
> +        (base32 "14jdnv0ljqvpr9ych1plfw7hp5q57a8j1bv8h3v345x06z783d07"))))
> +    (build-system haskell-build-system)
> +    (arguments
> +      `(#:phases
> +         (modify-phases %standard-phases
> +           ;; Carp looks inside the sources checkout to know where to
> +           ;; find its core libraries and other files.
> +           ;; Carp emits C code and tries to compile it with an external
> +           ;; C compiler. On Linux it defaults to Clang.
> +           (add-after 'install 'set-carp-dir-and-path
> +             (lambda* (#:key inputs outputs #:allow-other-keys)
> +               (let ((out (assoc-ref outputs "out"))
> +                     (sources (assoc-ref inputs "source"))
> +                     (clang (assoc-ref inputs "clang")))
> +                 (wrap-program (string-append out "/bin/carp")
> +                   `("CARP_DIR" = (,sources))
> +                   `("PATH" = (,(string-append clang "/bin"))))
> +                 (wrap-program (string-append out "/bin/carp-header-parse")
> +                   `("CARP_DIR" = (,sources))
> +                   `("PATH" = (,(string-append clang "/bin"))))))))))
> +    (native-inputs (list ghc-hunit))
> +    (inputs (list bash-minimal
> +                  clang
> +                  ghc-blaze-markup
> +                  ghc-blaze-html
> +                  ghc-split
> +                  ghc-ansi-terminal
> +                  ghc-cmark
> +                  ghc-edit-distance
> +                  ghc-hashable
> +                  ghc-open-browser
> +                  ghc-optparse-applicative))
> +    (home-page "https://carp-lang.org/")
> +    (synopsis "Statically typed Lisp without a garbage collector")
> +    (description
> +"@code{carp} is a programming language designed to work well for
> +interactive and performance sensitive use cases like games, sound
> +synthesis and visualizations.")
> +    (license license:asl2.0)))
> +
>  (define-public lisp-repl-core-dumper
>    (package
>      (name "lisp-repl-core-dumper")





Information forwarded to guix-patches <at> gnu.org:
bug#58898; Package guix-patches. (Sun, 30 Oct 2022 17:21:02 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#58898; Package guix-patches. (Sun, 30 Oct 2022 21:42:02 GMT) Full text and rfc822 format available.

Message #23 received at 58898 <at> debbugs.gnu.org (full text, mbox):

From: jgart <jgart <at> dismail.de>
To: 58898 <at> debbugs.gnu.org
Cc: Christine Lemmer-Webber <cwebber <at> dustycloud.org>, "\(" <paren <at> disroot.org>,
 jgart <jgart <at> dismail.de>
Subject: [PATCH v5] gnu: Add carp.
Date: Sun, 30 Oct 2022 16:38:42 -0500
* gnu/packages/lisp.scm (carp): New variable.

Co-authored-by: ( <paren <at> disroot.org>

hi christine,

here is v5 co-authored with paren.

double function works now ;()

see here: https://paste.sr.ht/~unmatched-paren/712cc5a63e3feb2981d6aaaed97f4c0726c8f3bb
---
 gnu/packages/lisp.scm | 72 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 72 insertions(+)

diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm
index 4899943ba8..3db2e5e74a 100644
--- a/gnu/packages/lisp.scm
+++ b/gnu/packages/lisp.scm
@@ -22,6 +22,7 @@
 ;;; Copyright © 2021 Charles Jackson <charles.b.jackson <at> protonmail.com>
 ;;; Copyright © 2022 Joeke de Graaf <joeke <at> posteo.net>
 ;;; Copyright © 2021, 2022 jgart <jgart <at> dismail.de>
+;;; Copyright © 2022 ( <paren <at> disroot.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -55,6 +56,7 @@ (define-module (gnu packages lisp)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system ant)
   #:use-module (guix build-system asdf)
+  #:use-module (guix build-system haskell)
   #:use-module (guix build-system trivial)
   #:use-module (gnu packages admin)
   #:use-module (gnu packages base)
@@ -71,10 +73,14 @@ (define-module (gnu packages lisp)
   #:use-module (gnu packages gl)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages groff)
+  #:use-module (gnu packages haskell-check)
+  #:use-module (gnu packages haskell-web)
+  #:use-module (gnu packages haskell-xyz)
   #:use-module (gnu packages libffcall)
   #:use-module (gnu packages libffi)
   #:use-module (gnu packages libsigsegv)
   #:use-module (gnu packages linux)
+  #:use-module (gnu packages llvm)
   #:use-module (gnu packages m4)
   #:use-module (gnu packages maths)
   #:use-module (gnu packages multiprecision)
@@ -1268,6 +1274,72 @@ (define-public janet
 assembler, PEG) is less than 1MB.")
     (license license:expat)))
 
+(define-public carp
+  (package
+    (name "carp")
+    (version "0.5.5")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/carp-lang/Carp")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "14jdnv0ljqvpr9ych1plfw7hp5q57a8j1bv8h3v345x06z783d07"))))
+    (build-system haskell-build-system)
+    (arguments
+     (list #:phases
+           #~(modify-phases %standard-phases
+               ;; Carp looks inside the sources checkout to know where to
+               ;; find its core libraries and other files.
+               ;; Carp emits C code and tries to compile it with an external
+               ;; C compiler. On Linux it defaults to Clang.
+               (add-after 'install 'wrap-programs
+                 (lambda* (#:key inputs #:allow-other-keys)
+                   (define (wrap-carp-program program)
+                     (wrap-program (string-append
+                                    #$output "/bin/" program)
+                       `("CARP_DIR" prefix
+                         (#$(package-source this-package)))
+                       `("PATH" prefix
+                         ,(list (dirname
+                                 (search-input-file inputs "bin/clang"))
+                                (dirname
+                                 (search-input-file inputs "bin/ld"))))
+                       `("C_INCLUDE_PATH" prefix
+                         ,(list (dirname
+                                 (search-input-directory
+                                  inputs "include/linux"))
+                                (dirname
+                                 (search-input-file
+                                  inputs "include/stdlib.h"))))))
+
+                   (for-each wrap-carp-program
+                             (list "carp"
+                                   "carp-header-parse")))))))
+    (inputs
+     (list bash-minimal
+           clang
+           ghc-blaze-markup
+           ghc-blaze-html
+           ghc-split
+           ghc-ansi-terminal
+           ghc-cmark
+           ghc-edit-distance
+           ghc-hashable
+           ghc-open-browser
+           ghc-optparse-applicative))
+    (native-inputs
+     (list ghc-hunit))
+    (home-page "https://carp-lang.org/")
+    (synopsis "Statically typed Lisp without a garbage collector")
+    (description
+     "@code{carp} is a Lisp-like programming language that compiles to
+C.  It features inferred static typing, macros, automatic memory
+management without a garbage collector, a REPL, and straightforward
+integration with code written in C.")
+    (license license:asl2.0)))
 (define-public lisp-repl-core-dumper
   (package
     (name "lisp-repl-core-dumper")
-- 
2.38.1





Information forwarded to guix-patches <at> gnu.org:
bug#58898; Package guix-patches. (Wed, 09 Nov 2022 02:49:02 GMT) Full text and rfc822 format available.

Message #26 received at submit <at> debbugs.gnu.org (full text, mbox):

From: jgart <jgart <at> dismail.de>
To: Christine Lemmer-Webber <cwebber <at> dustycloud.org>
Cc: 58898 <at> debbugs.gnu.org, guix-patches <at> gnu.org
Subject: Re: [bug#58898] [PATCH v4] gnu: Add carp.
Date: Tue, 8 Nov 2022 20:48:39 -0600
On Sun, 30 Oct 2022 13:18:22 -0400 Christine Lemmer-Webber <cwebber <at> dustycloud.org> wrote:

Hi Christine,

Just leaving a friendly reminder if you'd be able to look at this patch
again when you get a chance.

I think it might be good to go now but let me know what your experience
is with the newest patch.

all best,

jgart

https://whereis.みんな/




Information forwarded to guix-patches <at> gnu.org:
bug#58898; Package guix-patches. (Wed, 09 Nov 2022 02:49:02 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#58898; Package guix-patches. (Fri, 11 Nov 2022 05:56:01 GMT) Full text and rfc822 format available.

Message #32 received at 58898 <at> debbugs.gnu.org (full text, mbox):

From: jgart <jgart <at> dismail.de>
To: 58898 <at> debbugs.gnu.org
Cc: "\(" <paren <at> disroot.org>, jgart <jgart <at> dismail.de>
Subject: [PATCH v2] gnu: Add carp.
Date: Thu, 10 Nov 2022 23:55:07 -0600
* gnu/packages/lisp.scm (carp): New variable.

Co-authored-by: ( <paren <at> disroot.org>
---
 gnu/packages/lisp.scm | 72 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 72 insertions(+)

diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm
index d0f24163cb..80018f8e1a 100644
--- a/gnu/packages/lisp.scm
+++ b/gnu/packages/lisp.scm
@@ -22,6 +22,7 @@
 ;;; Copyright © 2021 Charles Jackson <charles.b.jackson <at> protonmail.com>
 ;;; Copyright © 2022 Joeke de Graaf <joeke <at> posteo.net>
 ;;; Copyright © 2021, 2022 jgart <jgart <at> dismail.de>
+;;; Copyright © 2022 ( <paren <at> disroot.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -55,6 +56,7 @@ (define-module (gnu packages lisp)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system ant)
   #:use-module (guix build-system asdf)
+  #:use-module (guix build-system haskell)
   #:use-module (guix build-system trivial)
   #:use-module (gnu packages admin)
   #:use-module (gnu packages base)
@@ -71,10 +73,14 @@ (define-module (gnu packages lisp)
   #:use-module (gnu packages gl)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages groff)
+  #:use-module (gnu packages haskell-check)
+  #:use-module (gnu packages haskell-web)
+  #:use-module (gnu packages haskell-xyz)
   #:use-module (gnu packages libffcall)
   #:use-module (gnu packages libffi)
   #:use-module (gnu packages libsigsegv)
   #:use-module (gnu packages linux)
+  #:use-module (gnu packages llvm)
   #:use-module (gnu packages m4)
   #:use-module (gnu packages maths)
   #:use-module (gnu packages multiprecision)
@@ -1257,6 +1263,72 @@ (define-public janet
 assembler, PEG) is less than 1MB.")
     (license license:expat)))
 
+(define-public carp
+  (package
+    (name "carp")
+    (version "0.5.5")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/carp-lang/Carp")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "14jdnv0ljqvpr9ych1plfw7hp5q57a8j1bv8h3v345x06z783d07"))))
+    (build-system haskell-build-system)
+    (arguments
+     (list #:phases
+           #~(modify-phases %standard-phases
+               ;; Carp looks inside the sources checkout to know where to
+               ;; find its core libraries and other files.
+               ;; Carp emits C code and tries to compile it with an external
+               ;; C compiler. On Linux it defaults to Clang.
+               (add-after 'install 'wrap-programs
+                 (lambda* (#:key inputs #:allow-other-keys)
+                   (define (wrap-carp-program program)
+                     (wrap-program (string-append
+                                    #$output "/bin/" program)
+                       `("CARP_DIR" prefix
+                         (#$(package-source this-package)))
+                       `("PATH" prefix
+                         ,(list (dirname
+                                 (search-input-file inputs "bin/clang"))
+                                (dirname
+                                 (search-input-file inputs "bin/ld"))))
+                       `("C_INCLUDE_PATH" prefix
+                         ,(list (dirname
+                                 (search-input-directory
+                                  inputs "include/linux"))
+                                (dirname
+                                 (search-input-file
+                                  inputs "include/stdlib.h"))))))
+
+                   (for-each wrap-carp-program
+                             (list "carp"
+                                   "carp-header-parse")))))))
+    (inputs
+     (list bash-minimal
+           clang
+           ghc-blaze-markup
+           ghc-blaze-html
+           ghc-split
+           ghc-ansi-terminal
+           ghc-cmark
+           ghc-edit-distance
+           ghc-hashable
+           ghc-open-browser
+           ghc-optparse-applicative))
+    (native-inputs
+     (list ghc-hunit))
+    (home-page "https://carp-lang.org/")
+    (synopsis "Statically typed Lisp without a garbage collector")
+    (description
+     "@code{carp} is a Lisp-like programming language that compiles to
+C.  It features inferred static typing, macros, automatic memory
+management without a garbage collector, a REPL, and straightforward
+integration with code written in C.")
+    (license license:asl2.0)))
 (define-public lisp-repl-core-dumper
   (package
     (name "lisp-repl-core-dumper")
-- 
2.38.1





Information forwarded to guix-patches <at> gnu.org:
bug#58898; Package guix-patches. (Fri, 11 Nov 2022 13:35:01 GMT) Full text and rfc822 format available.

Message #35 received at 58898 <at> debbugs.gnu.org (full text, mbox):

From: jgart <jgart <at> dismail.de>
To: 58898 <at> debbugs.gnu.org
Cc: "\(" <paren <at> disroot.org>, jgart <jgart <at> dismail.de>
Subject: [PATCH v7] gnu: Add carp.
Date: Fri, 11 Nov 2022 07:32:29 -0600
* gnu/packages/lisp.scm (carp): New variable.

Co-authored-by: ( <paren <at> disroot.org>

Here's a v7. Previous patches were not applying cleanly.

all best,

jgart
---
 gnu/packages/lisp.scm | 73 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 73 insertions(+)

diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm
index d0f24163cb..2e2562c471 100644
--- a/gnu/packages/lisp.scm
+++ b/gnu/packages/lisp.scm
@@ -22,6 +22,7 @@
 ;;; Copyright © 2021 Charles Jackson <charles.b.jackson <at> protonmail.com>
 ;;; Copyright © 2022 Joeke de Graaf <joeke <at> posteo.net>
 ;;; Copyright © 2021, 2022 jgart <jgart <at> dismail.de>
+;;; Copyright © 2022 ( <paren <at> disroot.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -55,6 +56,7 @@ (define-module (gnu packages lisp)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system ant)
   #:use-module (guix build-system asdf)
+  #:use-module (guix build-system haskell)
   #:use-module (guix build-system trivial)
   #:use-module (gnu packages admin)
   #:use-module (gnu packages base)
@@ -71,10 +73,14 @@ (define-module (gnu packages lisp)
   #:use-module (gnu packages gl)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages groff)
+  #:use-module (gnu packages haskell-check)
+  #:use-module (gnu packages haskell-web)
+  #:use-module (gnu packages haskell-xyz)
   #:use-module (gnu packages libffcall)
   #:use-module (gnu packages libffi)
   #:use-module (gnu packages libsigsegv)
   #:use-module (gnu packages linux)
+  #:use-module (gnu packages llvm)
   #:use-module (gnu packages m4)
   #:use-module (gnu packages maths)
   #:use-module (gnu packages multiprecision)
@@ -1257,6 +1263,73 @@ (define-public janet
 assembler, PEG) is less than 1MB.")
     (license license:expat)))
 
+(define-public carp
+  (package
+    (name "carp")
+    (version "0.5.5")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/carp-lang/Carp")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "14jdnv0ljqvpr9ych1plfw7hp5q57a8j1bv8h3v345x06z783d07"))))
+    (build-system haskell-build-system)
+    (arguments
+     (list #:phases
+           #~(modify-phases %standard-phases
+               ;; Carp looks inside the sources checkout to know where to
+               ;; find its core libraries and other files.
+               ;; Carp emits C code and tries to compile it with an external
+               ;; C compiler. On Linux it defaults to Clang.
+               (add-after 'install 'wrap-programs
+                 (lambda* (#:key inputs #:allow-other-keys)
+                   (define (wrap-carp-program program)
+                     (wrap-program (string-append
+                                    #$output "/bin/" program)
+                       `("CARP_DIR" prefix
+                         (#$(package-source this-package)))
+                       `("PATH" prefix
+                         ,(list (dirname
+                                 (search-input-file inputs "bin/clang"))
+                                (dirname
+                                 (search-input-file inputs "bin/ld"))))
+                       `("C_INCLUDE_PATH" prefix
+                         ,(list (dirname
+                                 (search-input-directory
+                                  inputs "include/linux"))
+                                (dirname
+                                 (search-input-file
+                                  inputs "include/stdlib.h"))))))
+
+                   (for-each wrap-carp-program
+                             (list "carp"
+                                   "carp-header-parse")))))))
+    (inputs
+     (list bash-minimal
+           clang
+           ghc-blaze-markup
+           ghc-blaze-html
+           ghc-split
+           ghc-ansi-terminal
+           ghc-cmark
+           ghc-edit-distance
+           ghc-hashable
+           ghc-open-browser
+           ghc-optparse-applicative))
+    (native-inputs
+     (list ghc-hunit))
+    (home-page "https://carp-lang.org/")
+    (synopsis "Statically typed Lisp without a garbage collector")
+    (description
+     "@code{carp} is a Lisp-like programming language that compiles to
+C.  It features inferred static typing, macros, automatic memory
+management without a garbage collector, a REPL, and straightforward
+integration with code written in C.")
+    (license license:asl2.0)))
+
 (define-public lisp-repl-core-dumper
   (package
     (name "lisp-repl-core-dumper")
-- 
2.38.1





Information forwarded to guix-patches <at> gnu.org:
bug#58898; Package guix-patches. (Fri, 11 Nov 2022 13:38:02 GMT) Full text and rfc822 format available.

Message #38 received at 58898 <at> debbugs.gnu.org (full text, mbox):

From: jgart <jgart <at> dismail.de>
To: 58898 <at> debbugs.gnu.org
Cc: "\(" <paren <at> disroot.org>, jgart <jgart <at> dismail.de>
Subject: [PATCH v8] gnu: Add carp.
Date: Fri, 11 Nov 2022 07:37:27 -0600
* gnu/packages/lisp.scm (carp): New variable.

Co-authored-by: ( <paren <at> disroot.org>
---
 gnu/packages/lisp.scm | 73 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 73 insertions(+)

diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm
index d0f24163cb..2e2562c471 100644
--- a/gnu/packages/lisp.scm
+++ b/gnu/packages/lisp.scm
@@ -22,6 +22,7 @@
 ;;; Copyright © 2021 Charles Jackson <charles.b.jackson <at> protonmail.com>
 ;;; Copyright © 2022 Joeke de Graaf <joeke <at> posteo.net>
 ;;; Copyright © 2021, 2022 jgart <jgart <at> dismail.de>
+;;; Copyright © 2022 ( <paren <at> disroot.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -55,6 +56,7 @@ (define-module (gnu packages lisp)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system ant)
   #:use-module (guix build-system asdf)
+  #:use-module (guix build-system haskell)
   #:use-module (guix build-system trivial)
   #:use-module (gnu packages admin)
   #:use-module (gnu packages base)
@@ -71,10 +73,14 @@ (define-module (gnu packages lisp)
   #:use-module (gnu packages gl)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages groff)
+  #:use-module (gnu packages haskell-check)
+  #:use-module (gnu packages haskell-web)
+  #:use-module (gnu packages haskell-xyz)
   #:use-module (gnu packages libffcall)
   #:use-module (gnu packages libffi)
   #:use-module (gnu packages libsigsegv)
   #:use-module (gnu packages linux)
+  #:use-module (gnu packages llvm)
   #:use-module (gnu packages m4)
   #:use-module (gnu packages maths)
   #:use-module (gnu packages multiprecision)
@@ -1257,6 +1263,73 @@ (define-public janet
 assembler, PEG) is less than 1MB.")
     (license license:expat)))
 
+(define-public carp
+  (package
+    (name "carp")
+    (version "0.5.5")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/carp-lang/Carp")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "14jdnv0ljqvpr9ych1plfw7hp5q57a8j1bv8h3v345x06z783d07"))))
+    (build-system haskell-build-system)
+    (arguments
+     (list #:phases
+           #~(modify-phases %standard-phases
+               ;; Carp looks inside the sources checkout to know where to
+               ;; find its core libraries and other files.
+               ;; Carp emits C code and tries to compile it with an external
+               ;; C compiler. On Linux it defaults to Clang.
+               (add-after 'install 'wrap-programs
+                 (lambda* (#:key inputs #:allow-other-keys)
+                   (define (wrap-carp-program program)
+                     (wrap-program (string-append
+                                    #$output "/bin/" program)
+                       `("CARP_DIR" prefix
+                         (#$(package-source this-package)))
+                       `("PATH" prefix
+                         ,(list (dirname
+                                 (search-input-file inputs "bin/clang"))
+                                (dirname
+                                 (search-input-file inputs "bin/ld"))))
+                       `("C_INCLUDE_PATH" prefix
+                         ,(list (dirname
+                                 (search-input-directory
+                                  inputs "include/linux"))
+                                (dirname
+                                 (search-input-file
+                                  inputs "include/stdlib.h"))))))
+
+                   (for-each wrap-carp-program
+                             (list "carp"
+                                   "carp-header-parse")))))))
+    (inputs
+     (list bash-minimal
+           clang
+           ghc-blaze-markup
+           ghc-blaze-html
+           ghc-split
+           ghc-ansi-terminal
+           ghc-cmark
+           ghc-edit-distance
+           ghc-hashable
+           ghc-open-browser
+           ghc-optparse-applicative))
+    (native-inputs
+     (list ghc-hunit))
+    (home-page "https://carp-lang.org/")
+    (synopsis "Statically typed Lisp without a garbage collector")
+    (description
+     "@code{carp} is a Lisp-like programming language that compiles to
+C.  It features inferred static typing, macros, automatic memory
+management without a garbage collector, a REPL, and straightforward
+integration with code written in C.")
+    (license license:asl2.0)))
+
 (define-public lisp-repl-core-dumper
   (package
     (name "lisp-repl-core-dumper")
-- 
2.38.1





Reply sent to Raghav Gururajan <rg <at> raghavgururajan.name>:
You have taken responsibility. (Sat, 12 Nov 2022 09:08:02 GMT) Full text and rfc822 format available.

Notification sent to jgart <jgart <at> dismail.de>:
bug acknowledged by developer. (Sat, 12 Nov 2022 09:08:02 GMT) Full text and rfc822 format available.

Message #43 received at 58898-done <at> debbugs.gnu.org (full text, mbox):

From: Raghav Gururajan <rg <at> raghavgururajan.name>
To: 58898-done <at> debbugs.gnu.org
Cc: jgart <jgart <at> dismail.de>
Subject: Re: [PATCH] gnu: Add carp.
Date: Sat, 12 Nov 2022 04:07:38 -0500
[Message part 1 (text/plain, inline)]
Pushed as 0209ee0b55 to master.

Thanks for the patch.

Regards,
RG.
[OpenPGP_signature (application/pgp-signature, attachment)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 10 Dec 2022 12:24:12 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 242 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.