[racket] make-limited-input-port and Port Events
In the development version (in the git repo), I've changed
`make-limited-input-port' to produce a port that supports progress
events when the given port supports progress events.
At Sun, 12 Jun 2011 02:55:38 +0100, Milo Arvidsson wrote:
>
> I'm getting contract violations when I use 'make-limited-input-port' with port
> events.
> For example, this program:
>
> #lang racket/base
> (require racket/port)
> (define in (open-input-string "12345\n"))
> (sync (read-line-evt (make-limited-input-port in 512)))
> fails like this:
> contract violation: expected <input-port-with-progress-evts?>, given:
> #<input-port:string>
> contract on read-line-evt from
> (file C:\Program Files\Racket\collects\mzlib\port.rkt)
> blaming
> (file d:\example.rkt)
> contract:
> (case->
> (-> input-port-with-progress-evts? evt?)
> (->
> input-port-with-progress-evts?
> line-mode-symbol?
> evt?))
> at: <collects>/mzlib\port.rkt:1811.2
>
> So, I guess the port returned by 'make-limited-input-port' does not provide
> progress events:
>
> #lang racket/base
> (require racket/port)
> (port-provides-progress-evts? (make-limited-input-port (open-input-string
> "12345\n") 512))
>
> that program returns #f ... I'm using Racket v5.1.1 on
> Windows.
> _________________________________________________
> For list-related administrative tasks:
> http://lists.racket-lang.org/listinfo/users