( modules day 11.04.2001 )

needs vocabulary vocs

: module: ( "name" -- old-current )
  >in @ ['] ' catch
  if >in ! vocabulary get-current
     also latest l>name name> execute definitions
  else 
     nip get-current swap also execute definitions
  then
;

: export
     ( old-current -- old-current )
   dup set-current
;

: ;module ( old-current -- )
   set-current previous
;

: {{ ( "name" -- )
        depth >r
        also ' execute
        depth r> <>             if
             context !          then
; immediate

: }}
   previous
; immediate

\eof
\ example:

module: testVoc

: hidden ;

export

: shown hidden ;

;module