(provide my-class-getter my-class-setter)
eval:2:0: provide: not at module level
in: (provide my-class-getter my-class-setter)
location...:
eval:2:0
context...:
raise-syntax-error
apply-transformer-in-context
apply-transformer52
dispatch-transformer41
expand-capturing-lifts
loop
/Applications/Racket v7.0/share/pkgs/sandbox-lib/racket/sandbox.rkt:493:0: call-with-custodian-shutdown
/Applications/Racket v7.0/collects/racket/private/more-scheme.rkt:148:2: call-with-break-parameterization
.../more-scheme.rkt:261:28
/Applications/Racket v7.0/share/pkgs/sandbox-lib/racket/sandbox.rkt:861:5: loop
我刚刚在jupyter笔记本中设置了iracket。似乎它不支持provide
。
如何解决此错误?
答案 0 :(得分:1)
IRacket笔记本的单元格就像REPL上的单独交互。因此,您不能使用provide
表单,该表单只能在模块的顶层使用。