hacked alist-type pasted by siiky 2 days ago

(import (chicken type))

(define-syntax define-type-pattern
  (syntax-rules ()
    ((define-type-pattern (type-name pattern ...) type-expression)
     (define-syntax type-name
       (syntax-rules ()
         ((type-name pattern ...)
          type-expression))))))

(define-type-pattern (alist-type key-type value-type) (list-of (pair key-type value-type)))

(let ((some-alist (the (alist-type symbol number) '())))
  (print some-alist))

hacked alist-type compilation error added by siiky 2 days ago

Error: (the) during expansion of (the ...) - invalid type specifier: (alist-type symbol number)

	Call history:

	<syntax>	  (##core#begin (let ((some-alist (the (alist-type symbol number) (quote ())))) (print some-alist)))
	<syntax>	  (let ((some-alist (the (alist-type symbol number) (quote ())))) (print some-alist))
	<syntax>	  (##core#let ((some-alist (the (alist-type symbol number) (quote ())))) (print some-alist))
	<syntax>	  (the (alist-type symbol number) (quote ()))	<--

Error: shell command terminated with non-zero exit status 17920: '/home/siiky/.local/bin/chicken' 'mvp.scm' -output-file 'mvp.c'