From 6bf9a257077dadf04ba3a900f957fe4aad70fc2c Mon Sep 17 00:00:00 2001 From: Dan Leslie Date: Fri, 11 Sep 2015 22:26:52 -0700 Subject: Adds recognition of the 'crunch' R5RS subset Crunch is a subset of R5RS that the crunch egg can heavily optimize via c++ compilation. This change allows geiser to report to chicken programmers whether the function is found within that subset, easing development. Details on the crunch egg can be found at: http://wiki.call-cc.org/eggref/4/crunch --- scheme/chicken/geiser/emacs.scm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'scheme') diff --git a/scheme/chicken/geiser/emacs.scm b/scheme/chicken/geiser/emacs.scm index cddf8da..0993812 100644 --- a/scheme/chicken/geiser/emacs.scm +++ b/scheme/chicken/geiser/emacs.scm @@ -172,6 +172,10 @@ require-extension select set! unless use when with-input-from-pipe match match-lambda match-lambda* match-let match-let* receive))) + (define geiser-chicken-crunch-symbols + (make-parameter + '(not eq? eqv? equal? + - * / = > < >= <= abs acos asin atan ceiling cos display even? exact? exact->inexact exp expt floor inexact? inexact->exact integer? log max min modulo negative? odd? positive? quotient remainder round sin sqrt tan truncate zero? char=? char>? char=? char<=? char->integer char-alphabetic? char-ci=? char-ci>? char-ci=? char-ci<=? char-downcase char-lower-case? char-numeric? char-upper-case? char-upcase char-whitespace? integer->char number->string make-string string=? string>? string=? string<=? string->number string-ci=? string-ci>? string-ci=? string-ci<=? string-append string-copy string-fill! string-length string-ref string-set! substring display newline write-char add1 atan2 arithmetic-shift bitwise-and bitwise-ior bitwise-not bitwise-xor sub1 f32vector-length f32vector-ref f32vector-set! f64vector-length f64vector-ref f64vector-set! make-f32vector make-f64vector make-s16vector make-s32vector make-s8vector make-u16vector make-u32vector make-u8vector s16vector-length s16vector-ref s16vector-set! s32vector-length s32vector-ref s32vector-set! s8vector-length s8vector-ref s8vector-set! subf32vector subf64vector subs16vector subs32vector subs8vector subu16vector subu32vector subu8vector u16vector-length u16vector-ref u16vector-set! u32vector-length u32vector-ref u32vector-set! u8vector-length u8vector-ref u8vector-set! blob->f32vector blob->f32vector/shared blob->f64vector blob->f64vector/shared blob->s16vector blob->s16vector/shared blob->s32vector blob->s32vector/shared blob->s8vector blob->s8vector/shared blob->string blob->string/shared blob->u16vector blob->u16vector/shared blob->u32vector blob->u32vector/shared blob->u8vector blob->u8vector/shared f32vector->blob f32vector->blob/shared f64vector->blob f64vector->blob/shared s16vector->blob s16vector->blob/shared s32vector->blob s32vector->blob/shared s8vector->blob s8vector->blob/shared string->blob string->blob/shared u16vector->blob u16vector->blob/shared u32vector->blob u32vector->blob/shared u8vector->blob u8vector->blob/shared flush-output void error exit argc argv-ref pointer-u8-ref pointer-s8-ref pointer-u16-ref pointer-s16-ref pointer-u32-ref pointer-s32-ref pointer-f32-ref pointer-f64-ref pointer-u8-set! pointer-s8-set! pointer-u16-set! pointer-s16-set! pointer-u32-set! pointer-s32-set! pointer-f32-set! pointer-f64-set!))) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Utilities ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -308,7 +312,10 @@ '()) (if (any (cut eq? <> sym) (geiser-chicken-builtin-symbols)) '(chicken) - '()))) + '()) + (if (any (cut eq? <> sym) (geiser-chicken-crunch-symbols)) + '(crunch) + '()))) ;; Locates any paths at which a particular symbol might be located (define (find-library-paths sym types) -- cgit v1.2.3