util  type-tests.scm at [81321a2c01]

File sexpc/type-tests.scm artifact 3a7d364dcb part of check-in 81321a2c01


(include "sexpc.scm")
((eval-type '()) 'v);

(define (test form)
  (print ((eval-type form) 'v)))

(define tests '(
	int char float uint
	(struct chungus_t)
	(ptr int) (array char)
	(array 5 (const int)) (const int)
	(const (ptr (array 5 (const int))))
	(const (ptr int))
	(array 5 (ptr int))
	(ref (array 5 int))
	(ptr (array (volatile char)))
	(const (ptr float))
	(ptr int)
	(ullong schar -> (ptr (bool u128 -> ldouble)))
	(int -> chungus_t)
	(ptr (int -> chungus_t))
	(array 5 (ptr (int -> chungus_t)))
	((array 5 (ptr int)) -> (const (ptr (array 3 int))))
	(array (const (ptr (char u128 -> (ptr (array 5 bool))))))
	
	(array 5 (const (ref char)))))

(map test tests)