Reputation: 21
HY everyone,
for class i had to import some libraries.
i got an error, after checking the libraries out, the problem basically boils down to
r6rs that gives this error : define-record-type: unbound identifier in module in: define-record-type
in this librarie :
#lang r6rs
(library
(scenario-line)
(export new say-what says-who say-it)
(import ;...
)
(define-record-type scenario-line
(new figure text)
scenario-line?
(figure says-who)
(text say-what))
(define (say-it scenario-line)
(diagonal-paste (diagonal-paste (says-who scenario-line)
(new-cloud 15 15))
(new-text-cloud (say-what scenario-line)))))
Upvotes: 0
Views: 775
Reputation: 70135
You left out your import
declarations which are the most important part for figuring out unbound identifiers!
The identifier define-record-type
is exported from the (rnrs records syntactic)
and thus you'll need to ensure that one of your imports is:
(import (rnrs records syntactic))
From the R6RS documentation:
The syntactic layer is provided by the (rnrs records syntactic (6))library. Some details of the specification are explained in terms of the specification of the procedural layer below.
The record-type-defining form define-record-type is a definition and can appear anywhere any other can appear. ...
Upvotes: 1