|
From: | Arthur A. Gleckler |
Subject: | loading *parser in an R7RS-Small library |
Date: | Tue, 25 Jul 2023 20:09:23 -0700 |
I've run into a snag while converting all of my MIT Scheme code to use R7RS-Small define-library
: I can't get *parser
to load. Is there a way to do this?
Thanks.
Here are the source files and a transcript:
(load-option '*parser)
define parse-non-negative-integer
(+ (char-set char-set:numeric))))) (*parser (match (
(define-library (ei)
(export parse-non-negative-integer)
(import (only (mit legacy runtime)
*parser
char-set
char-set:numeric
load-option)
(scheme base))"/tmp/ei.scm")) (include
1 ]=> (load-option '*parser)
;Loading "load.scm"...
; Loading "parser-unx.pkd"... done
; Loading "shared.com"... done
; Loading "matcher.com"... done
; Loading "parser.com"... done
;... done
;Value: *parser
1 ]=> (find-scheme-libraries! "/tmp/ei.sld")
;Registering library (ei) from "ei.sld"... done
;Unspecified return value
1 ]=> (load "/tmp/ei.sld")
;Loading "/tmp/ei.sld"... done
;Unspecified return value
1 ]=> (ge '(ei))
;The object #[char-set 12], passed as an argument to +, is not a number.
;To continue, call RESTART with an option number:
; (RESTART 1) => Return to read-eval-print level 1.
2 error> (debug)
18 subproblems on the stack.
There are
0 (this is the lowest subproblem level)
Subproblem level:
Compiled code _expression_ (from stack):begin <!> z)
(
subproblem being executed (marked by <!>):if (not (complex:complex? z))
("number" '+))
(error:wrong-type-argument z
Environment created by the procedure: UNARY-+
12])
applied to: (#[char-set 1 reduction.
The execution history for this subproblem contains
You are now in the debugger. Type q to quit, ? for commands.
3 debug> v*parser
v
Evaluate _expression_: ;Ignoring error:
;Transformer may not be used as an _expression_: #[transformer-item 13]
3 debug>
[Prev in Thread] | Current Thread | [Next in Thread] |