This file contains 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 | |
(define (foo [x : Any]) : Number | |
(let ([x* x]) | |
(begin | |
(set! x* "sneaky string") | |
(if (number? x) | |
x* | |
42)))) |
This file contains 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
;; ERROR EXAMPLE FILE "foo.rkt" | |
#lang typed/racket/base | |
;(provide Foo) ;; comment this line to see THE ERROR | |
(provide in-foo) | |
(require (for-syntax racket/base)) | |
;; -- taken from 'math/private/Foo/typed-array-struct.rkt' | |
(struct: (A) foo ([shape : (Vectorof Index)] |
This file contains 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
;; ERROR EXAMPLE FILE "main.rkt" | |
#lang typed/racket/base | |
(require "foo.rkt") | |
(: for-foo (-> (foo Any) Void)) | |
(define (for-foo arr) | |
(for ([sample (in-foo arr)]) (void))) | |
This file contains 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/base | |
(module foo-home typed/racket/base | |
;(provide foo) ;; comment this line to see THE ERROR | |
(provide in-foo) | |
(require (for-syntax racket/base)) | |
;; -- taken from 'math/private/Foo/typed-array-struct.rkt' |
This file contains 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 Any -> Number)) | |
(define (foo x y) | |
(cond | |
[(or (and (string? x) (string? y)) | |
(and (number? x) (number? y))) | |
(if (number? x) | |
y ;; <- doesn't typecheck |
This file contains 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
(match tail | |
... | |
[(if ,p ,tT ,fT) | |
(cps | |
[tTail* tE <- (Tail tTail) (: Tail/c Env/c)] | |
[fTail* fE <- (Tail fTail) (: Tail/c Env/c)] | |
[then | |
(let*-values ([(l+ tE*) (label-block tTail* 'T #f)] | |
[(l- fE*) (label-block fTail* 'F #f)] | |
[(tail* Ep)]) |
This file contains 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
(library (Compiler contracts) | |
(export UVar/c | |
FVar/c | |
Label/c | |
Relop/c | |
Binop/c | |
DispOp/c | |
Index/c | |
Int32/c | |
Int64/c |
This file contains 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
Internal Typechecker Error: no type for (quote put-text) at: #f line #f col #f | |
while typechecking: | |
here | |
originally: | |
here | |
context...: | |
/Users/amk/Repos/plt/extra-pkgs/typed-racket/typed-racket-lib/typed-racket/utils/tc-utils.rkt:262:0: int-err | |
/Users/amk/Repos/plt/racket/collects/racket/contract/private/arrow-val-first.rkt:265:18 | |
parser-name3 | |
dots-loop |
This file contains 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/base | |
;; Renderers for plot decorations: axes, grids, labeled points, etc. | |
(require typed/racket/class typed/racket/draw racket/match racket/math racket/list | |
plot/utils | |
"../common/type-doc.rkt" | |
"../common/utils.rkt" | |
"clip.rkt" | |
"plot-area.rkt") |
This file contains 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
;; contradictory: Filter/c Filter/c -> boolean? | |
;; Returns true if the AND of the two filters is equivalent to Bot | |
;; OLD contradictory? definition | |
(define (contradictory? f1 f2) | |
(match* (f1 f2) | |
[((TypeFilter: t1 p) (NotTypeFilter: t2 p)) | |
(subtype t1 t2)] | |
[((NotTypeFilter: t2 p) (TypeFilter: t1 p)) | |
(subtype t1 t2)] |
OlderNewer