Ticket #938: search-for-types-files-from-include-paths.patch

File search-for-types-files-from-include-paths.patch, 703 bytes (added by megane, 11 years ago)

a better hack

  • batch-driver.scm

    diff --git a/batch-driver.scm b/batch-driver.scm
    index f994ae6..9b9ef4f 100644
    a b  
    548548                    (collect-options 'types))
    549549                   (for-each
    550550                    (lambda (id)
    551                       (load-type-database (make-pathname #f (symbol->string id) "types")))
     551                      (let ((types-filename (make-pathname #f (symbol->string id) "types")))
     552                       (or
     553                        (load-type-database types-filename)
     554                        (and-let* ((tfile (##sys#resolve-include-filename
     555                                           types-filename
     556                                           #f #t))
     557                                   ((file-exists? tfile)))
     558                          (load-type-database types-filename
     559                                              (pathname-directory tfile))))))
    552560                    mreq)
    553561                   (begin-time)
    554562                   (set! first-analysis #f)