(current-memory-use cust) gives "wrong number of arguments" in typed racket

26 views
Skip to first unread message

James Cook

unread,
Dec 12, 2020, 10:09:13 PM12/12/20
to Racket Users
I'm new to racket, and I'm not sure if this is a bug or oversight or I'm just missing something.

In typed racket, when I try to pass a custodian as an argument to the current-memory-use function, I get an error like so:

falsifian angel ~ $ racket -I typed/racket
Welcome to Racket v7.9 [cs].
> (define c (make-custodian))
> (current-memory-use c)
; readline-input:2:0: Type Checker: could not apply function;
;  wrong number of arguments provided
;   expected: 0
;   given: 1
;   in: (current-memory-use c)
; [,bt for context]

If I don't pass "-I typed/racket" then there's no trouble. What's going on? Does the current-memory-use function need a better type annotation?

James

Sorawee Porncharoenwase

unread,
Dec 13, 2020, 7:56:15 PM12/13/20
to James Cook, Racket Users

--
You received this message because you are subscribed to the Google Groups "Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to racket-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/164bb6df-9dd6-4aa5-91a5-8ea3d70ad2a4n%40googlegroups.com.

James Cook

unread,
Dec 13, 2020, 8:21:10 PM12/13/20
to Racket Users
Thanks!
Reply all
Reply to author
Forward
0 new messages