File tree Expand file tree Collapse file tree 3 files changed +6
-12
lines changed
hackett-lib/hackett/private Expand file tree Collapse file tree 3 files changed +6
-12
lines changed Original file line number Diff line number Diff line change 241241 #:literal-sets [type-literals]
242242 [(#%type:wobbly-var x^)
243243 #:with [x1^ x2^] (generate-temporaries #'[x^ x^])
244- (modify-type-context
245- #{snoc % (ctx:solution #'x^ (template
246- (?->* (#%type:wobbly-var x1^) (#%type:wobbly-var x2^))))})
244+ (type-inst-l! #'x^ (template (?->* (#%type:wobbly-var x1^) (#%type:wobbly-var x2^))))
247245 (values (quasisyntax/loc src
248246 (lazy- (#%app- (force- #,e_fn) #,(τ⇐! e_arg #'(#%type:wobbly-var x1^)))))
249247 #'(#%type:wobbly-var x2^))]
Original file line number Diff line number Diff line change 3131 hackett/private/util/list
3232 hackett/private/util/stx)
3333
34- (provide (contract-out [struct ctx:solution ([x^ identifier?] [t type?])])
35- type? type=? constr? type-mono? type-vars^ type->string
34+ (provide type? type=? constr? type-mono? type-vars^ type->string
3635 generalize inst insts type<:/full! type<:/elaborate! type<:! type-inst-l! type-inst-r!
37- ctx-elem? ctx? ctx-elem=? ctx-member? ctx-remove
38- ctx-find-solution current-ctx-solution apply-subst apply-current-subst
36+ apply-subst apply-current-subst
3937 current-type-context modify-type-context
4038 attach-type attach-expected get-type get-expected apply-current-subst-in-tooltips
4139 make-typed-var-transformer
155153
156154(define/contract (ctx-find-solution ctx x^)
157155 (-> ctx? identifier? (or/c type? #f ))
158- (and~> (findf #{and (ctx:solution? %) (free-identifier=? x^ (ctx:solution-x^ %))} ctx)
156+ (and~> (findf #{and (ctx:solution? %)
157+ (free-identifier=? x^ (ctx:solution-x^ %))} ctx)
159158 ctx:solution-t))
160- (define/contract (current-ctx-solution x^)
161- (-> identifier? (or/c type? #f ))
162- (ctx-find-solution (current-type-context) x^))
163159
164160(define/contract (apply-subst ctx t)
165161 (-> ctx? type? type?)
Original file line number Diff line number Diff line change 273273 #t ]
274274 [[(#%type:wobbly-var x^) t]
275275 #:when (type-mono? #'t )
276- (modify- type-context #{snoc % (ctx:solution # 'x^ #'t )} )
276+ (type-inst-l! # 'x^ #'t )
277277 #t ]
278278 [[(#%type:con a) (#%type:con b)]
279279 #:when (free-identifier=? #'a #'b )
You can’t perform that action at this time.
0 commit comments