snip pasted by please_help on Sat Feb 6 15:06:40 2016

(define-syntax mac
  (syntax-rules ('# make-rtd) ;; TODO: handle mutability (with type annotation)
                ((_ (make-rtd name '#[vargs ...])) 'something)))

(mac
  (make-rtd 'test '#[test1 (test2) test3])
  )
 

no title added by jacius on Sun Feb 7 01:28:07 2016

;;; A few notes:
;;;
;;; '# is not valid in the syntax-rules literal identifiers list.
;;;
;;; # is special syntax in csi. It is read as the result of the
;;; previous evaluated expression. Since there is no previous
;;; evaluated expression, it results in the error,
;;; "Error: history entry index out of range: 0"
;;;
;;; The syntax for vectors in Scheme is #(), not #[]. #[] is invalid
;;; syntax, unless you have modified the read table to define that
;;; syntax yourself.
;;;
;;; syntax-rules can destructure vector literals, without adding
;;; anything to the literal identifiers list.


;;; Here is what you probably want:

(define-syntax mac
  (syntax-rules (make-rtd) ;; TODO: handle mutability (with type annotation)
    ((_ (make-rtd name '#(vargs ...)))
     'something)))

(mac
 (make-rtd 'test '#(test1 (test2) test3)))