Changeset 13715 in project


Ignore:
Timestamp:
03/12/09 19:10:14 (11 years ago)
Author:
Kon Lovett
Message:

Save.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/4/apropos/trunk/apropos.scm

    r13707 r13715  
    1212;; need to support syntactic environments, at least for lookup opertations.
    1313
     14;;; Prelude
    1415
    1516(declare
     
    2627    ##sys#signal-hook ) )
    2728
    28 
    29 ;;; Prelude
    30 
    31 (require-library regex lolevel data-structures)
    32 
    33 
    3429;;; Support
    35 
    36 ;; Errors
    37 
    38 (define-inline (%error-invalid-search loc obj)
    39   (##sys#signal-hook #:type-error loc (##core#immutable '"bad argument type - not a string, symbol, or regexp") obj) )
    40 
    41 (define-inline (%error-invalid-environment loc obj)
    42   (##sys#signal-hook #:type-error loc (##core#immutable '"bad argument type - not an environment") obj) )
    43 
    44 (define-inline (%error-invalid-macro-environment loc obj)
    45   (##sys#signal-hook #:type-error loc (##core#immutable '"bad argument type - not a macro environment") obj) )
    46 
    47 (define-inline (%error-invalid-any-environment loc obj)
    48   (##sys#signal-hook #:type-error loc (##core#immutable '"bad argument type - not an environment or macro environment") obj) )
    4930
    5031;; Argument Checking
     
    5233(define-inline (%check-environment loc obj)
    5334  (unless (##sys#environment? obj)
    54     (%error-invalid-environment loc obj) ) )
     35    (error-invalid-environment loc obj) ) )
    5536
    5637(define-inline (%check-macro-environment loc obj)
    5738  (unless (or (not obj) (##sys#syntactic-environment? obj))
    58     (%error-invalid-macro-environment loc obj) ) )
     39    (error-invalid-macro-environment loc obj) ) )
    5940
    6041(define-inline (%check-search-pattern loc obj)
    6142  (unless (or (string? obj) (symbol? obj) (regexp? obj))
    62     (%error-invalid-search loc patt) ) )
     43    (error-invalid-search loc patt) ) )
    6344
    6445;;;
     46
     47(require-library regex lolevel data-structures)
    6548
    6649(module apropos (;export
     
    8265;;; Suuport
    8366
     67;; Errors
     68
     69(define-inline (error-invalid-search loc obj)
     70  (##sys#signal-hook #:type-error loc "bad argument type - not a string, symbol, or regexp" obj) )
     71
     72(define-inline (error-invalid-environment loc obj)
     73  (##sys#signal-hook #:type-error loc "bad argument type - not an environment" obj) )
     74
     75(define-inline (error-invalid-macro-environment loc obj)
     76  (##sys#signal-hook #:type-error loc "bad argument type - not a macro environment" obj) )
     77
     78(define-inline (error-invalid-any-environment loc obj)
     79  (##sys#signal-hook #:type-error loc "bad argument type - not an environment or macro environment" obj) )
     80
    8481;;
    8582
     
    8885        ((##sys#syntactic-environment? obj) obj)
    8986        (else
    90           (%error-invalid-any-environment loc obj) ) ) )
     87          (error-invalid-any-environment loc obj) ) ) )
    9188
    9289;; Symbols
Note: See TracChangeset for help on using the changeset viewer.