-
-
Notifications
You must be signed in to change notification settings - Fork 103
Closed
Description
What version of Racket are you using?
8.7 and 8.8 - same outcome on both
What program did you run?
(println (port->string (input-port-append #t (open-input-string "hello") (open-input-string "typed") (open-input-string "racket"))))
What should have happened?
"hellotypedracket"
If you got an error message, please include it here.
string:1:23: Type Checker: could not apply function;
wrong number of arguments provided
expected: 2
given: 3
in: (input-port-append #t (open-input-string "hello") (open-input-string "typed") (open-input-string "racket"))
location...:
string:1:23
context...:
/home/cadence/.racket/share/pkgs/typed-racket-lib/typed-racket/typecheck/tc-app-helper.rkt:32:0: tc/funapp1
/home/cadence/.racket/share/pkgs/typed-racket-lib/typed-racket/typecheck/tc-funapp.rkt:71:0: tc/funapp
.../private/runtime.rkt:80:24: temp676
.../private/runtime.rkt:89:23: fail-handler114
[stack trace continues...]
Further information
Works in regular racket.
The type in base-env.rkt is [input-port-append (->* (list Univ) -Input-Port -Input-Port)]
. I cloned the repo and messed around with the type but I wasn't able to make any progress towards fixing this. As far as I can tell (despite the unusual syntax in this file...) I think that type is already correct.
While the error message says "wrong number of arguments", I can't figure out where I'm calling a function incorrectly. Altering my calls to input-port-append
and/or open-input-string
to add or remove more arguments doesn't change the error message. It always says it expected 2, given 3.
Metadata
Metadata
Assignees
Labels
No labels