ryanc
2018-7-2 09:36:48

@leif something about lifts confused the macro stepper


gfb
2018-7-2 14:02:29

Is there somewhere that describes how contracts for typed-untyped boundaries are generated. In particular, I’d like to know what Any means below, how the two different contracts are generated, and understand the four check-false results. #lang racket (module typed typed/racket (provide split split′) (: split : ∀ (α) (Listof α) (α → Any) → (Listof (Listof α))) (define (split a-list property) '(())) (: split′ : (Listof Any) (Any → Any) → (Listof (Listof Any))) (define split′ split)) (require 'typed rackunit) (define-values (split-contract split′-contract) (values (value-contract split) (value-contract split′))) (check-equal? (contract-name split-contract) '(-> (listof any/c) (-> any/c any/c) any)) (check-equal? (contract-name split′-contract) '(-> (listof any/c) (or/c struct-predicate-procedure?/c (-> Any any/c)) (listof (listof Any)))) (check-true (contract-stronger? (-> (listof any/c) (-> any/c any/c) any) (-> (listof any/c) (-> any/c any/c) any))) (check-true (contract-stronger? split-contract split-contract)) (check-true (contract-stronger? split′-contract split′-contract)) (check-false (contract-stronger? (value-contract split) (-> (listof any/c) (-> any/c any/c) any))) (check-false (contract-stronger? (-> (listof any/c) (-> any/c any/c) any) (value-contract split))) (check-false (contract-stronger? split-contract split′-contract)) (check-false (contract-stronger? split′-contract split-contract))


samth
2018-7-2 14:06:12

Any corresponds to the any-wrap/c contract


samth
2018-7-2 14:06:34

The latter two check-false results are probably because those are significantly different


samth
2018-7-2 14:06:40

the former two I don’t understand


gfb
2018-7-2 14:30:27

Thanks, any-wrap/c is undocumented, but I found it in the source. Is looking at typed-racket/private/type-contract.rkt the best reference at the moment for how the contracts are generated?


samth
2018-7-2 15:10:55

@gfb for the details of how everything works, yes


leif
2018-7-2 17:39:25

@ryanc I see.


leif
2018-7-2 17:40:01

I can understand how it wouldn’t be able to step through that (possibly), but is that error expected?