Hello all, <br><br>I am attempting to do some further work on the frtime lang. Specifically, I'm working out of a branch based on the pull request <a href="https://github.com/plt/racket/pull/138">https://github.com/plt/racket/pull/138</a> - this new branch is the frtime-contracts branch. <br>
Link to frtime-contracts branch: <br><a href="https://github.com/paddymahoney/racket/tree/frtime-contracts">https://github.com/paddymahoney/racket/tree/frtime-contracts</a><br><br> In this library, I am beginning to add contracts. I've begun with the file frtime/core/dv.rkt: <br>
...<br>#|Contracts|#<br>(define vec-length/c natural-number/c)<br><br>(define vec/c vector?)<br><br>(define vec-pos/c natural-number/c)<br><br>(define dv/c (struct/dc dv <br> [vec-length vec-length/c] <br>
[next-avail-pos (vec) (and/c natural-number/c (<=/c (vector-length vec)))]<br> [vec vec/c]))<br><br>(define dv:length/c (-> dv? natural-number/c))<br><br>(define dv:make/c (-> natural-number/c dv?))<br>
<br>(define dv:remove-last/c (-> dv? void))<br><br>(define dv:ref/c (->i ([a-dv dv?] <br> [pos (a-dv) (and/c (<=/c (dv:length a-dv) vec-pos/c))])<br> [_ any/c]))<br><br>
(provide<br> (contract-out [dv? (any/c . -> . boolean?)]<br> [dv:make dv:make/c]<br> [dv:length dv:length/c]<br> [dv:remove-last dv:remove-last/c]<br> [dv:ref dv:ref/c]))<br>
<br>(provide/contract*<br> #;[dv? (any/c . -> . boolean?)]<br> #;[dv:make (exact-nonnegative-integer? . -> . dv?)]<br> #;[dv:length (dv? . -> . exact-nonnegative-integer?)]<br> #;[dv:remove-last (non-empty-dv? . -> . void?)]<br>
#;[dv:ref (->d ([dv dv?] [pos exact-nonnegative-integer?]) () <br> #:pre-cond (pos . < . (dv:length dv))<br> [r any/c])]<br> [dv:set! (->d ([dv dv?] [pos exact-nonnegative-integer?] [val any/c]) () <br>
#:pre-cond (pos . < . (dv:length dv))<br> [r void])]<br> [dv:append (dv? any/c . -> . void)])<br><br>Upon running the analog-clock.rkt demo in the frtime/demos folder, I receive the following errors: <br>
<br>module-path-index-resolve: "self" index has no resolution<br> module path index: #<module-path-index><br>. Module Language: invalid language specification in: frtime/frtime-big<br><br>Another error that arises is: <br>
define-values/invoke-unit/infer: unknown signature in: graphics:posn-less^<br><br>Removing the (provide (contract-out ...)) form in favor of the original (provide/contract* ...) form with the comments removed resolves the errors. What can I do to resolve these errors with the contracts enabled? I tried enabling individual contracts, but the errors still occurred. I don't doubt that there could be errors in the contracts, but there don't appear to be any contract violations that I see when running in Dr.Racket. <br>
<br>Instructions to Reproduce<br>
1. Open a command line and: <br>
> git clone <a href="https://github.com/paddymahoney/racket.git" target="_blank">https://github.com/paddymahoney/racket.git</a><br>
(you might want to do this in a different directory than that which holds another fork of racket)<br>2. <br>> git checkout frtime-contracts<br>3. Open the "racket/collects/frtime/<div id=":1c1">develop-frtime.rkt" file in drracket
and update the two paths. <br>4. Run the function (start-developing-frtime) to
ensure that the development rather than installation collection is used
when we run the demos. If you don't, any collection paths will refer to
the install directory, and you will receive errors. <br>
5. Open "racket/collects/frtime/demos/analog-clock.rkt. Run it in Dr. Racket<br>
<br>
Please let me know if you require any further assistance reproducing
this bug, and I will endeavor to provide.<br></div><br>Thank you all, <br>-Patrick<br><br><br><br>