summaryrefslogtreecommitdiff
path: root/tdecl/tdecl-utils.scm
blob: 0009eeb11dce4c3f1f52b7f3eb44d55c787a5562 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
;;; This file contains routines which generate the code for the
;;; dictionaries used in the class system.

(define (make-sel-node size i)
  (**lambda '(x)
     (if (eqv? size 1)
	 (**var 'x)
	 (**sel (tuple-constructor size) (**var 'x) i))))

(define (make-compose f1 f2)
  (**lambda '(x)
      (**app f1 (**app f2 (**var 'x)))))

(define (make-new-var name)  ; name is a string
  (create-definition *module* (string->symbol name) 'var))