Changeset 35743 in project


Ignore:
Timestamp:
07/05/18 03:23:22 (3 months ago)
Author:
kon
Message:

use "atomized" symbol-utils, add ,srfi stuff (no new C4 eggs), should add feature stuff

Location:
release/4/apropos/trunk
Files:
4 added
4 edited

Legend:

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

    r35739 r35743  
    99 (depends
    1010        (setup-helper "1.5.2")
     11        (check-errors "1.9.0")
    1112        (miscmacros "2.91")
    12         ;(moremacros "1.4.1")
    1313        (string-utils "1.1.0")
    14         (symbol-utils "1.0.0")
    15         (check-errors "1.9.0"))
     14        (symbol-utils "1.1.0"))
    1615 (test-depends test)
    1716 (files
    1817  "apropos.meta" "apropos.setup"
    1918  "apropos.scm"
    20   "tests/run.scm" "tests/apropos-test.scm") )
     19  "apropos-srfi.scm" "apropos-srfi-csi.scm" "apropos-srfi-db.scm"
     20  "tests/run.scm" "tests/apropos-test.scm"
     21  "tests/apropos-srfi-test.scm") )
  • release/4/apropos/trunk/apropos.scm

    r35739 r35743  
    1 ;;;; apropos.scm -*- Hen -*-
     1;;;; apropos.scm
     2;;;; Kon Lovett, Oct '17
     3;;;; Kon Lovett, Mar '09
    24;;;; From the Chicken 4 core, Version 4.0.0x5 - SVN rev. 13662
    3 ;;;; Kon Lovett, Mar '09
    4 ;;;; Kon Lovett, Oct '17
    55
    66;; Issues
     
    2323;; ; {{search|mode pre[fix]|suff[ix]|#t}} : {{#:search-mode #:prefix|#:suffix|#t}}
    2424;; ; {{SEARCH-MODE}} : Either {{#:prefix}}, {{#:suffix}}, or {{#t}} for contains. The default is {{#t}}.
     25
     26(declare
     27  (bound-to-procedure
     28    ##sys#symbol-has-toplevel-binding?
     29    ##sys#macro-environment
     30    ##sys#current-environment
     31    ##sys#macro?))
    2532
    2633(module apropos
     
    3845
    3946(import scheme chicken foreign)
    40 
    4147(import (only csi toplevel-command))  ;wtf?
    42 
    4348(use
    4449  (only data-structures
     
    6772    irregex-match-data? irregex-match-num-submatches
    6873    irregex-replace)
     74  miscmacros
    6975  (only memoized-string
    7076    make-string*)
    71   (only symbol-utils
     77  (only symbol-name-utils
    7278    symbol->keyword
    7379    symbol-printname=? symbol-printname<?
    74     symbol-printname-length max-symbol-printname-length )
     80    symbol-printname-length max-symbol-printname-length)
     81  (only symbol-qualified-utils
     82    qualified-symbol?)
    7583  (only type-checks
    7684    check-fixnum define-check+error-type)
    7785  (only type-errors
    78     define-error-type error-argument-type)
    79   miscmacros)
    80 
    81 (declare
    82   (bound-to-procedure
    83     ##sys#symbol-has-toplevel-binding?
    84     ##sys#qualified-symbol?
    85     ##sys#macro-environment
    86     ##sys#current-environment
    87     ##sys#macro? ) )
     86    define-error-type error-argument-type))
    8887
    8988;;; Support
    9089
    91 ;;
    92 
     90;; Raw Access Renames
     91
     92(define system-current-environment ##sys#current-environment)
     93
     94(define system-macro-environment ##sys#macro-environment)
     95
     96(define (global-symbol-bound? sym)
     97  (##sys#symbol-has-toplevel-binding? sym) )
     98
     99(define (global-symbol-ref sym)
     100  (##sys#slot sym 0) )
     101
     102(define (symbol-macro-in-environment? sym macenv)
     103  (and sym macenv (##sys#macro? sym macenv)) )
     104
     105;;
     106
     107;for our purposes
    93108(define-constant *CHICKEN-MAXIMUM-BASE* 16)
    94109
     
    96111
    97112(define (->boolean obj)
    98   (and
    99     obj
    100     #t ) )
     113  (and obj #t ) )
    101114
    102115;; irregex extensions
     
    118131      (string-append x (make-string rem pad))
    119132      (string-append (substring x 0 (fx- n (string-length tag))) tag) ) ) )
    120 
    121 ;; raw access renames
    122 
    123 (define system-current-environment ##sys#current-environment)
    124 
    125 (define system-macro-environment ##sys#macro-environment)
    126 
    127 (define (global-symbol-bound? sym)
    128   (##sys#symbol-has-toplevel-binding? sym) )
    129 
    130 (define (global-symbol-ref sym)
    131   (##sys#slot sym 0) )
    132 
    133 (define (symbol-macro-in-environment? sym macenv)
    134   (and sym macenv (##sys#macro? sym macenv)) )
    135 
    136 (define (qualified-symbol? sym)
    137   (and sym (##sys#qualified-symbol? sym)) )
    138133
    139134;; Constants
  • release/4/apropos/trunk/apropos.setup

    r35436 r35743  
    66
    77(unless (version>=? (chicken-version) "4.4.0")
     8  (enable-warnings #t)
    89  (warning "cannot use with CHICKEN earlier than version 4.4.0, install apropos:1.4.3 instead.")
    910  (exit 1) )
    1011
    11 (setup-shared-extension-module 'apropos (extension-version "2.7.2")
     12(setup-shared-extension-module 'apropos (extension-version "2.8.0")
    1213  #:types? #t
    1314  #:inline? #t
    14   #:compile-options '(
    15     -O3 -d1
    16     -no-procedure-checks))
     15  #:compile-options '(-O3 -d1 -no-procedure-checks))
     16
     17;;; (verify-extension-name "apropos-srfi" #;"1.0.0")
     18
     19(setup-shared-extension-module 'apropos-srfi-db (extension-version "2.8.0")
     20  #:types? #t
     21  #:inline? #t
     22  #:compile-options '(-O3 -d1 -no-procedure-checks))
     23
     24(setup-shared-extension-module 'apropos-srfi (extension-version "2.8.0")
     25  #:types? #t
     26  #:inline? #t
     27  #:compile-options '(-O3 -d1 -no-procedure-checks))
     28
     29(setup-shared-extension-module 'apropos-srfi-csi (extension-version "2.8.0")
     30  #:types? #t
     31  #:inline? #t
     32  #:compile-options '(-O3 -d1 -no-procedure-checks))
  • release/4/apropos/trunk/tests/run.scm

    r35049 r35743  
    4242
    4343(run-test)
     44
     45(run-test "apropos-srfi")
Note: See TracChangeset for help on using the changeset viewer.