Skip to content

Instantly share code, notes, and snippets.

@pnwamk
Created January 10, 2015 19:33
Show Gist options
  • Save pnwamk/11b14797f3b6cb03f717 to your computer and use it in GitHub Desktop.
Save pnwamk/11b14797f3b6cb03f717 to your computer and use it in GitHub Desktop.
main.rkt (aliasing path error)
;; 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)))
;ishimura:array-error amk$ racket main.rkt
;Internal Typechecker Error:
; Bad path/type lookup!
; Path:(((foo Nothing) - 4))
; Type: Error
;
;while typechecking:
;proc
;originally:
;(for ((sample (in-foo arr))) (void))
; 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/extra-pkgs/typed-racket/typed-racket-lib/typed-racket/typecheck/tc-expr-unit.rkt:41:0: tc-id
; /Users/amk/Repos/plt/extra-pkgs/typed-racket/typed-racket-lib/typed-racket/typecheck/tc-expr-unit.rkt:277:0: core757
; /Users/amk/Repos/plt/extra-pkgs/typed-racket/typed-racket-lib/typed-racket/typecheck/tc-expr-unit.rkt:63:0: tc-expr/t
; /Users/amk/Repos/plt/extra-pkgs/typed-racket/typed-racket-lib/typed-racket/typecheck/tc-app/tc-app-main.rkt:68:0: tc/app-regular
; /Users/amk/Repos/plt/extra-pkgs/typed-racket/typed-racket-lib/typed-racket/typecheck/tc-expr-unit.rkt:274:0: tc-expr
; /Users/amk/Repos/plt/extra-pkgs/typed-racket/typed-racket-lib/typed-racket/private/type-annotation.rkt:75:0: get-type/infer
; /Users/amk/Repos/plt/extra-pkgs/typed-racket/typed-racket-lib/typed-racket/typecheck/tc-let-unit.rkt:255:0: core389
; /Users/amk/Repos/plt/extra-pkgs/typed-racket/typed-racket-lib/typed-racket/typecheck/tc-expr-unit.rkt:77:0: tc-expr/check
; /Users/amk/Repos/plt/extra-pkgs/typed-racket/typed-racket-lib/typed-racket/typecheck/tc-if.rkt:14:0: core16
; /Users/amk/Repos/plt/extra-pkgs/typed-racket/typed-racket-lib/typed-racket/typecheck/tc-expr-unit.rkt:77:0: tc-expr/check
; /Users/amk/Repos/plt/extra-pkgs/typed-racket/typed-racket-lib/typed-racket/typecheck/tc-lambda-unit.rkt:507:0: tc/rec-lambda/check
; temp149
; /Users/amk/Repos/plt/extra-pkgs/typed-racket/typed-racket-lib/typed-racket/typecheck/tc-expr-unit.rkt:77:0: tc-expr/check
; /Users/amk/Repos/plt/extra-pkgs/typed-racket/typed-racket-lib/typed-racket/typecheck/tc-expr-unit.rkt:295:5: loop
; /Users/amk/Repos/plt/extra-pkgs/typed-racket/typed-racket-lib/typed-racket/typecheck/tc-let-unit.rkt:39:0: do-check...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment