When I try to run define-type on DrScheme, I get the error "reference to an identifier before its definition: define-type". Why is that happening?
I input:
(define-type GUI
[label (text string?)]
[button (text string?)
(enabled? boolean?)])
and I get back:
reference to an identifier before its definition: define-type
define-type is not part of "basic" Scheme, it is part of "Typed Scheme". To use this language in Dr Scheme:
Make sure "Module" is selected in the dropdown at the bottom left of the window. Then in the top window, enter:
#lang typed-scheme
and press the "run" button.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With