[<<][staapl][>>][..]
Tue Apr 29 11:41:00 EDT 2008

struct macros

it would be nice to abstract away the details for update pattern
matching. this requires some access to struct layout. basicly,
generate this from struct names:

(define-sr (compile-update
            (icurrent iwordlist iasm ictrl)
            (ocurrent owordlist oasm octrl))
  (match-lambda*
   ((list
     (struct compile-state (icurrent iwordlist))
     (struct 2stack (iasm ictrl)))
    (values
     (make-compile-state ocurrent owordlist)
     (make-2stack oasm octrl)))))

actually, it's much more straightforward to do this with structure
type inheritance. this requires a deep change though.. first: switch
order of fields in 2stack



[Reply][About]
[<<][staapl][>>][..]