Discussion:
[Larceny-users] HOWTO procedure-name-set! ?
KenD
2016-05-19 00:50:21 UTC
Permalink
Greetings,

I am using R7 code but also procedure-name-set! which has just become unavailabel with -r7r6.

Is there a 'lenient option?

Can I do an (import (cruft ..)) ?

What is the proper way to get procedure-name-set! and friends back into the global environment?

Thanks for any help,
-KenD
------------------
(trusty)***@localhost:~/SiS$ larceny
Larceny v0.99a1 (alpha test) (May 18 2016 07:04:49, precise:Linux:split)
larceny.heap, built on Wed May 18 07:47:33 PDT 2016
procedure-name-set!
#<PROCEDURE procedure-name-set!>
(exit)
(trusty)***@localhost:~/SiS$ larceny -r7r6
Larceny v0.99a1 (alpha test) (May 18 2016 07:04:49, precise:Linux:split)
larceny.heap, built on Wed May 18 07:47:33 PDT 2016
procedure-name-set!
Error: unhandled condition:
Compound condition has these components:
#<record &assertion>
#<record &message>
message : "?: undefined global variable: procedure-name-set! \n"

Entering debugger; type "?" for help.
debug>

------------------#!EOF
William D Clinger
2016-05-19 01:07:57 UTC
Permalink
Post by KenD
I am using R7 code but also procedure-name-set! which has just become unavailabel with -r7r6.
Is there a 'lenient option?
Can I do an (import (cruft ..)) ?
Yes. (import (primitives procname ...)) will import procname ...
from Larceny's underlying R5RS layer.
Post by KenD
What is the proper way to get procedure-name-set! and friends back into the global environment?
% ./larceny --r7rs
Larceny v0.99a1 (alpha test) (May 17 2016 19:31:23, precise:Linux:unified)
larceny.heap, built on Tue May 17 19:31:43 EDT 2016
Post by KenD
(import (primitives procedure-name-set!))
(define foo (lambda (x) (* x x)))
foo
Post by KenD
foo
#<PROCEDURE foo>
Post by KenD
(procedure-name-set! foo 'bar)
#f
Post by KenD
foo
#<PROCEDURE bar>


Will
KenD
2016-05-19 02:19:01 UTC
Permalink
Hmmm..

Something else that ran a couple of days ago now broken.

Not sure if this is a bug or my foolishness.

Perhaps I should ask when the GIT repository is "stable for testing" before updating. Sorry.

Thanks in advance,
-KenD
-----------------------------------------------------
Post by KenD
larceny -r7r6
Larceny v0.99a1 (alpha test) (May 18 2016 07:04:49, precise:Linux:split)
larceny.heap, built on Wed May 18 07:47:33 PDT 2016
(load "testing-tests.sch")
Error: unhandled condition:
Compound condition has these components:
#<record &assertion>
#<record &message>
message : "?: undefined global variable: make-case-lambda \n"

Entering debugger; type "?" for help.
debug>

-------------------!#EOF
KenD
2016-05-19 13:16:19 UTC
Permalink
On Wed, 18 May 2016 19:19:01 -0700
Post by KenD
Hmmm..
Something else that ran a couple of days ago now broken.
Not sure if this is a bug or my foolishness.
Ah. Tired yesterday. My foolishness.

Missed the case-lambda in my code. Now import srfi-39 (parameters).

Cheers,
-KenD

Loading...