www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit 4dcb1230b895ba5dd896eb069c6ffebec05aa972
parent caeda2ff0dc5f370a8a7203817384c8ff10a1bd5
Author: Stephen Chang <stchang@ccs.neu.edu>
Date:   Fri, 15 Aug 2014 16:21:58 -0400

stlc: add extensibility note in define-type

Diffstat:
Mstlc.rkt | 9+++++++++
1 file changed, 9 insertions(+), 0 deletions(-)

diff --git a/stlc.rkt b/stlc.rkt @@ -201,6 +201,15 @@ (begin-for-syntax + ;; EXTENSIBILITY NOTE: + ;; Originally, define-type was a #:literal instead of a #:datum-literal, but + ;; this became a problem when sysf extended define-type (but not modul-begin). + ;; Putting define-type in the #:literals list makes it always expect the stlc + ;; version of define-type, so it wasnt getting properly parsed in sysf. + ;; + ;; Similarly, I had to define the define-type pattern below to avoid explicitly + ;; mentioning define-type on the rhs, otherwise it would again lock in the stlc + ;; version of define-type. (define-syntax-class maybe-def #:datum-literals (: define variant define-type) (pattern (define (f:id [x:id : τx] ...) body ...) #:with τ_result (generate-temporary #'f)