2

When I am trying to run an evaluator in Dr. Racket, it shows the error: 'Module Language: there can only be one expression in the definitions window'.

Obviously there are multiple definitions in this window, an evaluator has multiple definitions, so how can I run these multiple definitions ? or is there any other method to run the evaluators.

Any help would be appreciated.

Hari Chaudhary
  • 630
  • 1
  • 7
  • 20

2 Answers2

6

I am new to Racket, and when I was trying to run my very first program I too encountered this error.

I added #lang racket/base at the beginning of the source code and it solved this problem.

Will Ness
  • 70,110
  • 9
  • 98
  • 181
ancab
  • 780
  • 1
  • 7
  • 12
1
#lang r5rs

resolve set-car! problem, but error was unknown this time. I resolved this by (#%require (only scheme/base error)).

So I add these two lines to make my evaluator run:

#lang r5rs
(#%require (only scheme/base error))
Hari Chaudhary
  • 630
  • 1
  • 7
  • 20