hyln9 / ikarus

Optimizing incremental native-code compiler for R6RS scheme. This is a forked repository.
https://launchpad.net/ikarus
Other
5 stars 0 forks source link

define-record-type allows 'extra' syntax #263

Open hyln9 opened 10 years ago

hyln9 commented 10 years ago

Hi

Some minor 'extra' syntax that define-record-type allows, but should not.

(protocol) (protocol #f) ; breaks evaluation rule (protocol x x ...)

(sealed) (sealed #t x) ; unexpected behavior (sealed x x ...)

(opaque) (opaque #t x) ; unexpected behavior (opaque x x ...)

Examples of what goes through:

(define-record-type foo (protocol)) (define-record-type foo (protocol a b c)) (define-record-type foo (opaque #t 1)) (define-record-type foo (opaque foo))

Unexpected behaviour is just my opinion. :)

Cheers

leppie

Launchpad Details: #LP433149 leppie - 2009-09-19 12:58:59 -0400