Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

define-type returning error on DrScheme

Tags:

scheme

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

like image 687
Kevin Avatar asked Jun 12 '26 02:06

Kevin


1 Answers

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.


Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!