0

I have this really simple script file test.rkt which tries to define a construct called pair:

#lang lazy

(define (pair A B)
  (λ (sel)
    (sel A B)))

(define (fst A B) A)
(define (snd A B) B)

syntax checker gives me error:

test.rkt:1:0: printing:module-begin: allowed only around a module body in: 
(printing:module-begin (module configure-runtime (quote #%kernel) (#%require 
racket/runtime-config) (configure #f)) (define (pair A B) (λ (sel) (sel A 
B))) (define (fst A B) A) (define (snd A B) B))

parentheses looks ok. so this error is rather arcane to me. what exactly went wrong?

EDIT: after closing Dr.Racket and restart it, the error went away. really weird.

I really wanted to understand what that error means. so next time it pops up I can start debugging right away, even if it would be a bug in Dr.racket.

Sajuuk
  • 2,667
  • 3
  • 22
  • 34
  • I have no problem running your code in DrRacket 6.9. What version are you using? – molbdnilo Jul 01 '17 at 15:25
  • @molbdnilo the error went away after I restart Dr.racket. i've no idea. btw I also use 6.9 – Sajuuk Jul 01 '17 at 17:53
  • It's possible that you could get some help or information on the Racket mailing list or their IRC channel, where you're more likely to reach the developers and maintainers. (They're very friendly, in my experience.) – molbdnilo Jul 01 '17 at 20:45

0 Answers0