guix-devel
[Top][All Lists]
Advanced

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

Re: 02/04: gnu: Add Poly/ML.


From: Andy Patterson
Subject: Re: 02/04: gnu: Add Poly/ML.
Date: Mon, 17 Jul 2017 21:13:55 -0400

Hi Mark,

On Mon, 17 Jul 2017 12:01:33 -0400
Mark H Weaver <address@hidden> wrote:

> address@hidden (Ludovic Courtès) writes:
> 
> > civodul pushed a commit to branch master
> > in repository guix.
> >
> > commit 9b7ee28d5700b47ae34bd47c32d250f042fbdbbd
> > Author: Andy Patterson <address@hidden>
> > Date:   Sat Jul 15 18:17:25 2017 -0400
> >
> >     gnu: Add Poly/ML.
> >     
> >     * gnu/packages/sml.scm: New file.
> >     * gnu/local.mk (GNU_SYSTEM_MODULES): Add it.  
> 
> Thank you for this!  I've become interested in some projects that
> require Poly/ML, notably CakeML and Milawa/Jitawa which are based on
> HOL4 and apparently require Poly/ML.  Now I can play with those
> things :)
> 
> > +       (modify-phases %standard-phases
> > +         (add-after 'build 'build-compiler
> > +           (lambda* (#:key make-flags parallel-build?
> > #:allow-other-keys)
> > +             (define flags
> > +               (if parallel-build?
> > +                   (cons (format #f "-j~d" (parallel-job-count))
> > +                         make-flags)
> > +                   make-flags))
> > +             (apply system* "make" (append flags (list
> > "compiler"))))))))  
> 
> This is not quite right.  Phase procedures return a boolean value to
> indicate success or failure.  'system*' returns a numeric status code.
> All numbers are treated as true by Scheme, so this will fail to detect
> errors.  By our usual conventions, we would replace the final
> expression above with:
> 
>   (zero? (apply system* "make" (append flags (list "compiler"))))
> 

Oh yeah; whoops. Appending a patch to fix that.
 
> > +    (home-page "http://www.polyml.org/";)
> > +    (synopsis "Standard ML implementation")
> > +    (description "Poly/ML is a Standard ML implementation.  It is
> > fully +compatible with the ML97 standard.  It includes a thread
> > library, a foreign +function interface, and a symbolic debugger.")  
> 
> It might be worth mentioning that Poly/ML cannot be bootstrapped from
> source code, and includes a precompiled version of itself, or at least
> that's my understanding.

Hmm, I worked on this because I wanted to have a non-bootstrapped sml.
I looked all over the place for binaries and I didn't find any. I guess
we could just ask?

> 
> Anyway, thanks again for this contribution.
> 
>        Mark

As for your building issues - I didn't experience any issues so I'm
not sure what to suggest. I'm not familiar with the project. Maybe we
need to turn off parallel builds or tests?

Thanks,

--
Andy

From 2505b5806e6a1cb88947dc253bd0f22ce5ce9fe1 Mon Sep 17 00:00:00 2001
From: Andy Patterson <address@hidden>
Date: Mon, 17 Jul 2017 20:51:52 -0400
Subject: [PATCH] gnu: polyml: Ensure that the compiler is built.

* gnu/packages/sml.scm (polyml)[arguments]<#:phases>: Check the return code of
"make compiler" in the 'build-compiler phase.
---
 gnu/packages/sml.scm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/sml.scm b/gnu/packages/sml.scm
index 6e57c4a4a..088109465 100644
--- a/gnu/packages/sml.scm
+++ b/gnu/packages/sml.scm
@@ -60,7 +60,8 @@
                    (cons (format #f "-j~d" (parallel-job-count))
                          make-flags)
                    make-flags))
-             (apply system* "make" (append flags (list "compiler"))))))))
+             (zero?
+              (apply system* "make" (append flags (list "compiler")))))))))
     (home-page "http://www.polyml.org/";)
     (synopsis "Standard ML implementation")
     (description "Poly/ML is a Standard ML implementation.  It is fully
-- 
2.13.2




reply via email to

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