(define (deconstructor-name-and-type n type constructor)
(let* ((name (symbol->string (car constructor)))
(gentype "!zzz")
(failtype (string-append "[" gentype "]*"))
(successtype (string-append "[" gentype (if (null? (cdr constructor)) "" ",")
(string-join (map (lambda (x) (symbol->string x)) (cdr constructor)) ",")
"]*")))
;; (println 'name name 'types types)
(string->symbol (string-append name "_Dstrct:[" gentype "," (symbol->string type) "*,"
successtype "," failtype "]*"))))