CS7480 Utilities
module->typed-identifiers
module->required-identifiers
definition-dict/  c
file-definitions
syntax-object-definitions
read-and-expand
7.7

CS7480 Utilities

Ben Greenman
and Milo Davis

 (require cs7480-util) package: cs7480-util

TODO

procedure

(module->typed-identifiers path)  (listof identifier?)

  path : path-string?
Return a list of identifiers referenced in a module that came from another module defined with #lang typed/racket or #lang typed/racket/base

procedure

(module->required-identifiers path 
  #:only-from only-from) 
  (listof identifier?)
  path : path-string?
  only-from : (or/c #f path-string? (listof path-string?))
Return a list of identifiers referenced in a module that are defined externally. If #:only-from is non-#f, the list is filtered to have only identifiers provided by one of the #:only-from modules.

value

definition-dict/c : (free-id-table? identifier? syntax?)

TODO

procedure

(file-definitions path)  definition-dict/c

  path : path-string?
Parse a module declaration from a file, fully expand the result syntax object, and collect a map from all identifiers to their expanded bodies. May not work if define-values creates multiple values

procedure

(syntax-object-definitions stx)  definition-dict/c

  stx : syntax?
Given a syntax object, create a map from identifiers to their bodies May not work if syntax object is not fully expanded

procedure

(read-and-expand path)  syntax?

  path : path-string?
Parse a module and return the fully expanded syntax object