[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#53878] [PATCH v3 09/15] gnu: Add racket-vm-cgc.
From: |
Liliana Marie Prikler |
Subject: |
[bug#53878] [PATCH v3 09/15] gnu: Add racket-vm-cgc. |
Date: |
Sun, 20 Feb 2022 19:13:58 +0100 |
User-agent: |
Evolution 3.42.1 |
Hi,
Am Sonntag, dem 20.02.2022 um 12:52 -0500 schrieb Philip McGrath:
> AFAICT the error is not from applying the function bound to the
> variable `racket-vm-for-system` (or `make-racket-vm-bc`, or
> whatever), but from evaluating the reference to a variable imported
> from a sibling `(gnu packages ...)` module, regardless of the value
> to which the variable is bound.
>
> My current best guess at Guile's semantics for mutually-recursive
> modules is that it's something like the `letrec` restriction, e.g.
> the difference between these two examples (given an implementation
> that fully enforces `letrec` semantics, as opposed to `letrec*`):
>
> --8<---------------cut here---------------start------------->8---
> $ scheme
> Chez Scheme Version 9.5.6
> Copyright 1984-2021 Cisco Systems, Inc.
>
> > (letrec ((a (lambda () 1))
> (b a))
> 2)
> Exception: attempt to reference undefined variable a
> Type (debug) to enter the debugger.
> > (letrec ((a (lambda () 1))
> (b (lambda () (a))))
> (b))
> 1
> --8<---------------cut here---------------end--------------->8---
>
> >
> > See (standard-packages) in guix/build-system/gnu.scm pointing to
> > (gnu
> > packages commencement) or (default-python) in guix/build-
> > system/python.scm for pointers.
>
> Given Ludo’'s explanation, I think the difference (or at least an
> important difference) is that those functions are defined in `(guix
> ...)` modules, as opposed to `(gnu packages ...)` modules.
>
> But I wish I knew with any degree of certainty *why* this would be
> true, if indeed it is.
>
> Maybe Maxime knows?
Both Ludo and Maxime already explained this, but to be extra clear,
it's the thunking.
(define foo <something-in-bar.scm>)
(define bar <something-in-foo.scm>) <- problem
(define (foo) <something-in-bar.scm>)
(define bar <something-in-foo.scm>) <- no problem.
Since inputs are thunked, you can define chez in chez.scm and racket in
racket.scm and use them as input to each other without breaking the
compiler (you will break the package builder though). If you want
something more meaningful, you can define racket-minimal in racket.scm
and use it in chez.scm as input to a package, then use that package as
input to racket. This does not work for (source ) and (inherit )
however, because those forms are not thunked. You would have to thunk
them until you reach a save haven (like a package's inputs), where you
can call the thunk to produce a value.
Cheers
- [bug#53878] [PATCH v3 06/15] gnu: Add stex., (continued)
- [bug#53878] [PATCH v3 06/15] gnu: Add stex., Philip McGrath, 2022/02/19
- [bug#53878] [PATCH v3 07/15] gnu: Add chez-nanopass., Philip McGrath, 2022/02/19
- [bug#53878] [PATCH v3 12/15] gnu: Add racket-vm-cs., Philip McGrath, 2022/02/19
- [bug#53878] [PATCH v3 05/15] gnu: chez-scheme: Use new package style., Philip McGrath, 2022/02/19
- [bug#53878] [PATCH v3 09/15] gnu: Add racket-vm-cgc., Philip McGrath, 2022/02/19
- [bug#53878] [PATCH v3 09/15] gnu: Add racket-vm-cgc., Liliana Marie Prikler, 2022/02/19
- Message not available
- [bug#53878] [PATCH v3 09/15] gnu: Add racket-vm-cgc., Liliana Marie Prikler, 2022/02/20
- [bug#53878] [PATCH v3 09/15] gnu: Add racket-vm-cgc., Philip McGrath, 2022/02/20
- [bug#53878] [PATCH v3 09/15] gnu: Add racket-vm-cgc., Liliana Marie Prikler, 2022/02/20
- [bug#53878] [PATCH v3 09/15] gnu: Add racket-vm-cgc., Philip McGrath, 2022/02/20
- [bug#53878] [PATCH v3 09/15] gnu: Add racket-vm-cgc.,
Liliana Marie Prikler <=
- [bug#53878] [PATCH v3 09/15] gnu: Add racket-vm-cgc., Philip McGrath, 2022/02/23
- [bug#53878] [PATCH v3 09/15] gnu: Add racket-vm-cgc., Liliana Marie Prikler, 2022/02/23
- [bug#53878] [PATCH v3 09/15] gnu: Add racket-vm-cgc., zimoun, 2022/02/24
[bug#53878] [PATCH v3 11/15] gnu: Add chez-scheme-for-racket., Philip McGrath, 2022/02/19
[bug#53878] [PATCH v3 04/15] gnu: chez-and-racket-bootstrap: Add utilities for Chez machine types., Philip McGrath, 2022/02/19
[bug#53878] [PATCH v3 08/15] gnu: chez-scheme: Explicitly package bootstrap bootfiles., Philip McGrath, 2022/02/19
[bug#53878] [PATCH v3 13/15] gnu: chez-mit: Support chez-scheme-for-racket., Philip McGrath, 2022/02/19
[bug#53878] [PATCH v3 14/15] gnu: chez-and-racket-bootstrap: Add 'chez-scheme-for-system'., Philip McGrath, 2022/02/19
[bug#53878] [PATCH v3 15/15] gnu: racket: Update to 8.4., Philip McGrath, 2022/02/19