yay, it works
I updated my PR to be able to directly run a racket file using chez, and it works for a trivial racket/base
program
unfortunately, extracting a module that uses displayln
doesn’t work
@mflatt extraction appears to have a bug when run to #lang typed/racket/base
programs
Flattening to a single linklet...
list-ref: contract violation
expected: pair?
given: '#s(linklet #~6.8.1.4D#�#~6.8.1.4B=
*AJZq���� *?Vas�������'4I[h���������
b�����P; Z w
O
�
��Hdelay/idleOmake-promise/idleJdelay/thread...
argument position: 1st
other arguments...:
1
context...:
/home/samth/tmp/linklet/pkgs/expander/run/linklet.rkt:255:0: extract-import-variables-from-expression25
/home/samth/tmp/linklet/pkgs/expander/extract/flatten.rkt:65:2: for-loop
/home/samth/tmp/linklet/pkgs/expander/extract/flatten.rkt:55:0: pick-variable-names21
/home/samth/tmp/linklet/pkgs/expander/extract/flatten.rkt:13:0: flatten!12
/home/samth/tmp/linklet/pkgs/expander/extract/main.rkt:23:0: extract11
"/home/samth/tmp/linklet/pkgs/expander/run.rkt": [running body]
for-loop_82
run-module-instance!123.1
for-loop_81
for-loop_80
run-module-instance!123.1
perform-require!74.1
looking at the stack trace was not illuminating, sadly
@samth Is it possible that you’re using a -c
directory that has been used in compiled mode (instead of source mode)?
I got the same error with just a #lang racket
file, so maybe that’s it
In any case, I don’t think you’re going to be able to extract from a typed/racket/base
program, because it’s likely to depend on syntax
removing the cache directory fixed it for #lang racket
, although that produces an odd chez error that I don’t understand yet
unfortunately the weird error looks like either a bug in your error handler that prints stack traces or (more likely) a chez bug
I’m currently going from Exception: variable \x31;/exn:fail:syntax is not bound
with the regular Chez error handler to compile: ~? in call to ~s
with yours
one thing to note: chez prints the symbol 1/x
as \x31;/x