On Mar 28, 2013, at 3:48 AM, Moritz Heidkamp wrote: > Jim Ursetto <[email protected]> writes: >> Unfortunately, I think it is essentially impossible at this time to >> have the compiler do this automatically via type analysis. I believe >> it is possible to get the compiler to treat string ports, for example, >> as a separate type and specialize on that. However, once you do this, >> you cannot use the existing procedures (such as close-input-port) >> which specialize on plain input-ports and output-ports, as there's no >> way to say that a particular type (string-input-port) is derived from >> another type (input-port) and is valid in lieu of the base type. > > Doesn't (define-type string-input-port input-port) work here?
My understanding is that defines a type alias and so you won't be able to generate code targeted only at string-input-port in that case. Jim _______________________________________________ Chicken-hackers mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/chicken-hackers
