Skip to content

Instantly share code, notes, and snippets.

@greghendershott
Last active August 29, 2015 13:57
Show Gist options
  • Save greghendershott/9487460 to your computer and use it in GitHub Desktop.
Save greghendershott/9487460 to your computer and use it in GitHub Desktop.
The typecheck error has no srcloc. Also the "in:" expression is the entire `test` submodule, not the specific piece of it. (In a longer example, the piece might even be ellided, after the "...".)
#lang typed/racket/base
(require racket/flonum)
(module+ test
(require typed/rackunit)
(define (from upto)
(for/flvector ([i (in-range from upto)])
0.0)))
; Type Checker: Error in macro expansion -- insufficient type information to typecheck. please add more type annotations
; in: ((require typed/rackunit) (define (from upto) (for/flvector ((i (in-range from upto))) 0.0)))
;;; Notice two problems:
;;;
;;; 1. There is no srcloc in the error message.
;;;
;;; 2. The "in:" expression is the entire `test` submodule contents, not
;;; the specific piece that didn't typecheck.
;;;
;;; It seems to be related to using `for/flvector`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment