language/dracula-module-begin-util.scm
(module dracula-module-begin-util mzscheme
  (require (lib "list.ss" "srfi" "1")
           (file "literal-identifier=.scm"))
  (provide (all-defined))
  ;; Partition ::= (make-pkg Non-empty-List[form]) | (make-includes Non-empty-List[include-book])
  (define-struct pkg (forms))
  (define-struct includes (forms))
  
  (define (include-book? form)
    (syntax-case* form (include-book include-book/local) literal-identifier=?
      [(include-book stuff ...) #t]
      [(include-book/local stuff ...) #t]
      [_ #f]))
  
  (define (split-after-includes forms)
    (span include-book? forms))
  
  (define (break-at-includes forms)
    (break include-book? forms)))