diff --git a/graph-lib/graph/graph-6-rich-returns.lp2.rkt b/graph-lib/graph/graph-6-rich-returns.lp2.rkt index 05222a4b..fd0f5584 100644 --- a/graph-lib/graph/graph-6-rich-returns.lp2.rkt +++ b/graph-lib/graph/graph-6-rich-returns.lp2.rkt @@ -192,9 +192,9 @@ produced by the first step. [mapping/node mapping/node-marker] ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;TODO: test: I'm unsure here [node (name #:placeholder City)]) #;(U (name/first-step mapping/node) - (tmpl-replace-in-type result-type - [mapping/node (name/first-step mapping/node)] - [node (name/first-step node)]))) + (tmpl-replace-in-type result-type + [mapping/node (name/first-step mapping/node)] + [node (name/first-step node)]))) … ;; TODO ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;TODO;^^;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -302,22 +302,14 @@ recursively: ("inline-instance" stx) (syntax-parse stx [(_ i-t (~and seen (:id (… …)))) - (define/with-syntax typp #'i-t) - (define/with-syntax repl (replace-in-instance #'typp - #'( - ))) - (displayln (list "i-t=" #'typp)) - #'repl - #;#'(λ ([x : i-t]) - : (inline-type* i-t seen) - (ann (repl x) - (inline-type* i-t seen "HERE")) - #;(error "NIY2"))])))] + (replace-in-instance #'i-t + #'( + ))])))] @chunk[ [second-step-mapping/node-of-first ;; from - (inline-type* result-type (mapping/node . seen) "RESSSS") ;; to + (inline-type result-type (mapping/node . seen)) ;; to (name/first-step #:? mapping/node) ;; pred? (λ ([x : second-step-mapping/node-of-first]) ;; fun ((inline-instance* result-type (mapping/node . seen)) @@ -457,20 +449,6 @@ which does not allow variants of (~> …). ---- @chunk[ - (define-type-expander (inline-type* stx) - (dbg - ("inline-type*" stx) - (syntax-parse stx - [(_ i-tyy (~and seen (:id (… …))) (~optional msg)) - (when (attribute msg) - (displayln (syntax-e #'msg))) - (define/with-syntax replt - ;; Same as above in inline-instance*, TODO: factor it out. - #'i-tyy - #;(replace-in-type #'(Let (id-~> second-step-marker-expander) i-tyy) - #'([node second-step-node-of-first] - …))) - #'(inline-type replt seen)]))) (define-type-expander (inline-type stx) (dbg ("inline-type" stx) @@ -483,8 +461,8 @@ which does not allow variants of (~> …). @chunk[ - [second-step-mapping/node-of-first ;mapping/node-marker ;; from - (inline-type* result-type (mapping/node . seen))] ;; to + [second-step-mapping/node-of-first ;; from + (inline-type result-type (mapping/node . seen))] ;; to …] @chunk[ @@ -577,10 +555,10 @@ encapsulating the result types of mappings. (begin-for-syntax (define-syntax-rule (dbg log . body) (begin - (display ">>> ")(displayln (list . log)) + ;(display ">>> ")(displayln (list . log)) (let ((res (let () . body))) - (display "<<< ")(displayln (list . log)) - (display "<<<= ")(display (car (list . log)))(display res)(displayln ".") + ;(display "<<< ")(displayln (list . log)) + ;(display "<<<= ")(display (car (list . log)))(display res)(displayln ".") res)))) )] diff --git a/graph-lib/graph/rewrite-type.lp2.rkt b/graph-lib/graph/rewrite-type.lp2.rkt index d10e0a8f..17e0afec 100644 --- a/graph-lib/graph/rewrite-type.lp2.rkt +++ b/graph-lib/graph/rewrite-type.lp2.rkt @@ -84,12 +84,12 @@ set of known type constructors like @tc[List] or @tc[Pairof], and recursively calls itself on the components of the type. @CHUNK[ - (define/debug (replace-in-type t r) + (define (replace-in-type t r) (define (recursive-replace new-t) (replace-in-type new-t r)) (define/with-syntax ([from to] ...) r) - (displayln (format "~a\n=> ~a" - (syntax->datum t) - (syntax->datum (expand-type t)))) + ;(displayln (format "~a\n=> ~a" + ; (syntax->datum t) + ; (syntax->datum (expand-type t)))) (syntax-parse (expand-type t) #:context #'(replace-in-type t r)