github2-x
2018-12-5 16:57:38

github2-x
2018-12-5 16:57:39

github2-x
2018-12-5 17:56:42

github2-x
2018-12-5 18:04:50

github2-x
2018-12-5 18:44:38

github2-x
2018-12-5 18:47:03

github2-x
2018-12-5 19:23:35

github2-x
2018-12-5 19:41:36

github2-x
2018-12-5 19:41:37

cadr
2018-12-5 19:49:07

@samth I’m still getting a similar (if not the same) error: -> #<procedure:rhs?> boolean? listof #<procedure:sattr?:1> #<procedure:rhs?> <collects>/syntax/parse/private/rep.rkt ERROR : fixup-rhs: contract violation expected: #<procedure:rhs?> given: #s(rhs (#s(attr value 0 #f)) #t #<syntax> (#s(variant #<syntax> (#s(attr value 0 #f) #s(attr x 0 #t)) #s(pat:and (#s(pat:ord #s(pat:fixup #<syntax> #<syntax> #<syntax> #<syntax> #s(arguments () () ()) #f #f) group2 0) #s(pat:ord #s(pat:action #s(action:and (#s(action:ord #s(action:post #s(action:fail #<syntax> #<syntax>)) group1 0) #s(action:bind #s(attr #<syntax> 0 #f) #<syntax>) #s(action:ord #s(action:post #s(action:fail #<syntax> #<syntax>)) group1 2) #s(action:ord #s(action:post #s(action:fail #<syntax> #<syntax>)) group1 3) #s(action:do (#<syntax>)))) #s(pat:any)) group2 1))) ())) () #t #t) in: the 1st argument of contract from: blaming: <collects>/syntax/parse/private/parse.rkt (assuming the contract is correct) at: <collects>/syntax/parse/private/rep.rkt:1.0


samth
2018-12-5 19:49:39

That’s the same thing


samth
2018-12-5 19:49:50

Probably somewhere else that needs interning


cadr
2018-12-5 19:51:35

I double checked that everything in the previous issue is solved now, now looking at the different places in the structs impl that intern things


cadr
2018-12-5 20:01:10

@samth Is there any reason we would want to unintern things when we look it up in the table? https://github.com/pycket/pycket/blob/569adf5c90708e180c41b0bf4d726640e7a54332/pycket/values_struct.py#L103


github2-x
2018-12-5 20:10:28

samth
2018-12-5 20:25:21

@cadr here’s a test case: (module pref '#%kernel (define-values (struct:a make-a a? a-b a-c) (let-values (((struct: make- ? -ref -set!) (let-values () (let-values () (#%app make-struct-type 'a '#f '2 '0 '#f null 'prefab '#f '(0 1) '#f 'a))))) (#%app values struct: make- ? (#%app make-struct-field-accessor -ref '0 'b) (#%app make-struct-field-accessor -ref '1 'c)))) (define-values (-struct:a -make-a -a? -a-b -a-c) (let-values (((struct: make- ? -ref -set!) (let-values () (let-values () (#%app make-struct-type 'a '#f '2 '0 '#f null 'prefab '#f '(0 1) '#f 'a))))) (#%app values struct: make- ? (#%app make-struct-field-accessor -ref '0 'b) (#%app make-struct-field-accessor -ref '1 'c)))) (display (-a? (make-prefab-struct 'a 1 2))))


cadr
2018-12-5 20:28:57

@samth my current fix makes this give #t


samth
2018-12-5 20:29:41

I can’t make the test fail, though


github2-x
2018-12-5 20:30:12

github2-x
2018-12-5 20:32:11

samth
2018-12-5 20:32:22

putting it in a separate test made it fail


samth
2018-12-5 20:32:55

and really running the test that way is so much faster


samth
2018-12-5 20:33:03

we should have been doing this long ago


cadr
2018-12-5 20:35:21

I agree


cadr
2018-12-5 20:35:34

@samth Here’s the new error wrong number of arguments to (lambda (v_709 neg-party_710) (let ([if10077 (p?_707 v_709)]) (if if10077 v_709 (let ([...act/private/prop.rkt:1:0_711 LinkletVar(raise-blame-error18.1:NO-VAL)][b84_712 b_708][neg-party85_713 neg-party_710][v86_714 v_709][temp87_715 '(expected: ~s given: ~e)][name88_716 name_706][v89_717 v_709][if10078 (variable-reference-constant? #<#%variable-reference>)]) (if if10078 (let ([AppRand48466 (list name88_716 v89_717)]) (LinkletVar(raise-blame-error16.1:NO-VAL) neg-party85_713 b84_712 v86_714 temp87_715 AppRand48466)) (let ([AppRator506 (checked-procedure-check-and-extract LinkletVar(struct:keyword-procedure:NO-VAL) ...act/private/prop.rkt:1:0_711 LinkletVar(keyword-procedure-extract:NO-VAL) '(#:missing-party) 7)][AppRand48467 (list neg-party85_713)]) (AppRator506 '(#:missing-party) AppRand48467 b84_712 v86_714 temp87_715 name88_716 v89_717))))))), expected 2 but got 1


samth
2018-12-5 20:36:08

ah I think I saw this with old pycket when I was trying to run some contract benchmarks


samth
2018-12-5 20:47:38

racket/contract/private/prop, line 519


samth
2018-12-5 20:49:56

(define (late-neg-first-order-projection name p?)
  (λ (b)
    (case-lambda
      [(v neg-party)
      (if (p? v)
          v
          (raise-blame-error
           b #:missing-party neg-party
           v
           '(expected: "~s" given: "~e")
           name
           v))]
      [args (eprintf "late-neg-first-order-projection got wrong argument count: ~s ~s" b args)
            (error 'late-neg-first-order-projection "bad args")])))

cadr
2018-12-5 21:07:13

@samth Here’s what we got : late-neg-first-order-projection got wrong argument count: #<blame-no-swap> (#<path:/home/cderici/racketland/racket/racket/collects/syntax/contract.rkt>)


samth
2018-12-5 21:07:41

with more information, here’s the same error: late-neg-first-order-projection got wrong argument count: #<blame-no-swap> #<procedure:> (or/c #f #<procedure:1/module-path?:321>) (#<path:/home/samth/sw/plt/racket/collects/syntax/contract.rkt>)


samth
2018-12-5 21:08:09

those are the two arguments to the outer function


samth
2018-12-5 21:08:35

but we still don’t know why it’s called wrongly


samth
2018-12-5 21:08:49

also, syntax/parse errors, but syntax/parse/pre does not


samth
2018-12-5 21:09:58

I wonder if it’s the use of contracts inside begin-for-syntax in syntax/parse.rkt


samth
2018-12-5 21:15:28

this fails: pk -l syntax/parse/experimental/contract


samth
2018-12-5 21:15:34

so it’s not anything in parse.rkt


samth
2018-12-5 21:52:15

much smaller reproduction:


samth
2018-12-5 21:52:47
> (require syntax/modcollapse)
> (collapse-module-path-index (module-path-index-join 'racket/base #f))

samth
2018-12-5 22:10:04
#lang racket/base

(module m racket/base
  (require racket/contract/base)
  (provide (contract-out [collapse-module-path-index (case->
                                                      (any/c . -> . (or/c #f string?))
                                                      (any/c any/c . -> . any/c))]))

  (define collapse-module-path-index
    (case-lambda
      [(a) "x.rkt"]
      [(a b) "x.rkt"])))

(require 'm)
(collapse-module-path-index #f)

samth
2018-12-5 22:20:05
#lang racket/base

(require racket/contract/base)

(define collapse-module-path-index
  (contract (case-> (-> any/c (or/c #f string?)))
            (lambda (a) "x.rkt")
              'a 'b))

(collapse-module-path-index #f)

samth
2018-12-5 22:20:10

the case-> is important


samth
2018-12-6 03:34:17

if you take out the with-contract-continuation-mark in the body of new around line 250 of case-arrow.rkt the bug goes away


samth
2018-12-6 03:54:51
[samth@huor:~/sw/pycket (master) plt] cat bad.rkt
#lang racket/base
(require racket/list)
(define blame #f)

(define (p x y) (+ x y))

(define h
  (lambda args
  (let ([args2 (map values args)])
    (eprintf "is this bad? ~s ~s\n" args args2)
    (begin
      (with-continuation-mark (make-continuation-mark-key 'xxxxx)
        (cons blame (last args))
        (let ()
          (eprintf "is this bad? ~s ~s\n" args args2)
          (apply p args)))))))


(h 1 2)
[samth@huor:~/sw/pycket (master) plt] pk bad.rkt
is this bad? (1 2) (1 2)
exn:fail : variable args_3 is unbound
[samth@huor:~/sw/pycket (master) plt]

samth
2018-12-6 03:54:57

there’s the bug


github2-x
2018-12-6 04:05:21

samth
2018-12-6 04:05:29

@cadr and there we are


github2-x
2018-12-6 04:07:40

github2-x
2018-12-6 04:33:40