Location grabbing in typed/rackunit

30 views
Skip to first unread message

shane c

unread,
Apr 28, 2020, 9:50:21 PM4/28/20
to Racket Users
I think require/typed/provide in typed/rackunit is affecting the location grabbing feature. Hoping someone can provide a suggested path forward. When I run this program,

#lang typed/racket/base

(require typed/rackunit)
(check-true (string<? "aaaa" "bbbb"))
(check-true (string<? "aaaa" "aabb"))
(check-true (string<? "aaaa" "aa"))

The last expression turns out to be (check-true #f) so an error is printed. However the error location points to rackunit source.

--------------------
string<?
FAILURE
name:       check-true
location:
  /Applications/Racket v7.6/share/pkgs/rackunit-typed/rackunit/main.rkt:33:2
params:     '(#f)
--------------------

I can switch to (require rackunit) in #lang racket/base and the location points to the source file as expected.

P.S. thanks for all your hard work. -shane

Ben Greenman

unread,
Apr 28, 2020, 10:53:03 PM4/28/20
to Racket Users
Right, require/typed/provide is turning off the location tracking.

Possible fix: add a `check-true` macro to typed/rackunit that calls
the require/typed `check-true` inside of a `(with-check-info ....)`
The macro should also set the check expression.

Can you open an issue for this in the rackunit repo?
Reply all
Reply to author
Forward
0 new messages