[plt-scheme] Typed-Scheme and call-with-input-file
Hi all,
I am trying call-with-input-file and I am getting a very unclear error:
#lang typed-scheme
(: read-char/file (String -> (U Char EOF)))
(define (read-char/file filename)
(call-with-input-file filename
(lambda: ((ip : Input-Port))
(read ip))
#:mode 'text))
typecheck: Cannot apply expression of type #(struct:tc-result (All (a)
(case-lambda (String ((U Output-Port Input-Port) -> a) -> a) (String
((U Output-Port Input-Port) -> a) Symbol -> a))) ((var #t
read-char/file)) ((var #f read-char/file))), since it is not a
function type in: (call-with-input-file filename (lambda: ((ip :
Input-Port)) (read ip)) #:mode (quote text))
What's the issue here?
Cheers,
--
Paulo Jorge Matos - pocmatos at gmail.com
Webpage: http://www.personal.soton.ac.uk/pocm