reformat
This commit is contained in:
parent
14b79a7d2a
commit
81c8032091
@ -20,8 +20,7 @@
|
||||
[let1E (var : Symbol) (te : TypeExp) (value : Exp) (body : Exp)]
|
||||
[recE (var : Symbol) (te : TypeExp) (value : Exp) (body : Exp)]
|
||||
[objE (fields : (Listof (Symbol * Exp)))]
|
||||
[msgE (obj : Exp) (selector : Symbol)]
|
||||
)
|
||||
[msgE (obj : Exp) (selector : Symbol)])
|
||||
|
||||
(define-type Type
|
||||
[numT]
|
||||
@ -84,11 +83,11 @@
|
||||
#t
|
||||
(let ([key (first keys)])
|
||||
(let ([Y-type (some-v (hash-ref Y-fields key))])
|
||||
(type-case (Optionof Type) (hash-ref X-fields key)
|
||||
[(none) #f] ;; Key not found in X-fields
|
||||
[(some X-type)
|
||||
(and (subtype? X-type Y-type) ;; Check subtyping of field types
|
||||
(loop (rest keys)))])))))] ;; Recurse on remaining keys
|
||||
(type-case (Optionof Type) (hash-ref X-fields key)
|
||||
[(none) #f] ;; Key not found in X-fields
|
||||
[(some X-type)
|
||||
(and (subtype? X-type Y-type) ;; Check subtyping of field types
|
||||
(loop (rest keys)))])))))] ;; Recurse on remaining keys
|
||||
(loop (hash-keys Y-fields)))]
|
||||
[else #f])]))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user