This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Exact-Number -><- Flonum | |
| Exact-Number -><- Flonum-Zero | |
| Float-Complex -><- (U Nonpositive-Exact-Rational Single-Flonum Byte-Larger-Than-One Positive-Index-Not-Byte Positive-Fixnum-Not-Index Positive-Integer-Not-Fixnum Positive-Rational-Not-Integer) | |
| Flonum -><- Zero | |
| Flonum -><- Float-Complex | |
| Flonum -><- One | |
| Flonum -><- Integer | |
| Flonum -><- Nonpositive-Integer | |
| Integer -><- Flonum | |
| Negative-Exact-Rational -><- Nonnegative-Exact-Rational |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #lang typed/racket | |
| (: foo (Any -> Number)) | |
| (define foo (λ (x) (cond | |
| [(not (string? x)) | |
| (cond | |
| [(string? x) "dead code"] | |
| [else 42])] | |
| [else 42]))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (define-datatype Expr | |
| [Var (Symbol)] | |
| [Lambda (Symbol Expr)] | |
| [App (Expr Expr)]) | |
| (: foo (Expr -> Symbol)) | |
| (define (foo e) | |
| (type-case Expr e | |
| [(Var x) => x] | |
| [(Lambda y b) => y] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #lang typed/racket | |
| (: small-car (~> ([p : (Pairof (Refine [i : Integer] | |
| (< i (cdr p))) | |
| Integer)]) | |
| (Refine [i : Integer] | |
| (< i (cdr p))))) | |
| (define (small-car p) | |
| ((inst car | |
| Integer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Typed Racket Tests > Unit Tests > Typechecker tests > tc-expr tests > 597 (let: ((v : Any 5)) (if (number? v) (+ v 1) 3)) | |
| 597 (let: ((v : Any 5)) (if (number? v) (+ v 1) 3)) | |
| FAILURE | |
| location: <pkgs>/typed-racket-test/unit-tests/typecheck-tests.rkt:597:8 | |
| actual: (tc-results | |
| (list | |
| (tc-result | |
| (U | |
| Zero | |
| One |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - - - - - - - random tests - - - - - - - | |
| SIZE: 10 | |
| sort: | |
| cpu time: 9 real time: 10 gc time: 2 | |
| unstable-sort: | |
| cpu time: 8 real time: 9 gc time: 1 | |
| SIZE: 15 | |
| sort: | |
| cpu time: 10 real time: 11 gc time: 1 | |
| unstable-sort: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #lang racket | |
| (require racket/unsafe/ops) | |
| (struct Cons (a d) #:transparent | |
| #:methods gen:equal+hash | |
| [(define (equal-proc c1 c2 =?) | |
| (and (=? (unsafe-struct-ref c1 0) | |
| (unsafe-struct-ref c2 0)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [new-metrics] | |
| total arrows observed: 3987 | |
| total dependent arrows: 352 (8.8%) | |
| total dependent arrows w/ kws: 0 (0%) | |
| total dependent arrows w/ rst: 0 (0%) | |
| total dependent arrows w/ drst: 0 (0%) | |
| total rest arrows: 726 (18.2%) | |
| total rest arrows w/ kws: 0 (0%) | |
| total rest arrows w/ drst: 0 (0%) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Racket shootout benchmarks on HEAD (commit 9e16d3f9c9c218825a483f6b53750ed9bbee2470) | |
| [racket ackermann (2364 2358 0) 25] | |
| [racket ackermann (2360 2355 0) 25] | |
| [racket ackermann (2372 2369 0) 25] | |
| [racket ary (3500 3498 0) 11] | |
| [racket ary (3508 3507 0) 11] | |
| [racket ary (3512 3511 4) 11] | |
| [racket binarytrees (852 852 148) 54] | |
| [racket binarytrees (844 844 140) 54] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Racket shootout benchmarks with no precompiled sort functions (i.e. PR #1854): | |
| [racket ackermann (2356 2357 0) 25] | |
| [racket ackermann (2356 2352 0) 25] | |
| [racket ackermann (2360 2357 0) 25] | |
| [racket ary (3504 3504 0) 11] | |
| [racket ary (3504 3500 4) 11] | |
| [racket ary (3512 3510 0) 11] | |
| [racket binarytrees (856 855 128) 53] | |
| [racket binarytrees (840 839 140) 53] |