Error returning definition type on DrScheme

When I try to run define-type on DrScheme, I get the error "identifier reference before its definition: define-type". Why is this happening?

I enter:

(define-type GUI
    [label (text string?)]
    [button (text string?)
            (enabled? boolean?)])

and I will return:

reference to identifier before its definition: define-type

+3
source share
1 answer

define-type is not part of the "basic" scheme, it is part of the "Typed scheme". To use this language in Dr Scheme:

Make sure "Module" is selected in the drop-down list in the lower left corner of the window. Then in the upper window type:

#lang typed-scheme

and click the "Run" button.

+4
source

Source: https://habr.com/ru/post/1729907/


All Articles