     check-duplicate-keys check-entries
     dup [ check-void 2drop ] assoc-each struct boa ;
 
-C: <user> user
-
 : <schema> ( types -- schema )
     check-entries schema boa ;
 

TUPLE: map from to ;
TUPLE: union members ;
TUPLE: struct fields ;
TUPLE: user name type ;
TUPLE: schema types ;

! errors

    utf8 file-contents parse-schema ;

: define-schema ( schema -- )
    ! XXX: define user types as tuples with bare-fields word-prop?
    types>> [
        [ create-word-in dup reset-generic ]
        [ define-constant ] bi*
    ] assoc-each ;

SYNTAX: SCHEMA: scan-object parse-schema define-schema ;
