[plt-scheme] still stuck with typed scheme problem: "Expected Attribute, but got Attribute"

From: keydana at gmx.de (keydana at gmx.de)
Date: Wed Apr 28 16:29:14 EDT 2010

Thank you Noel you're a darling!  (hope this doesn't sound too unidiomatic this time :-; )
So I'll just remove the  #:mutable temporarily and go on coding...

Seizing the opportunity, I'd like to ask again about my type matching problem :-;
Right now I'm doing the type matching for

1) types defined with define-struct: using (cond (mytype? x)...
2) type variants defined with Dave's define-datatype using (match x ((struct y (z)) ...

but I don't know how to test for 3) union types, nor 4) the type subsuming all those variants.
Or in fact I didn't know, because right now I've found

(define-predicate test? type)

in the documentation and it works fine for both cases.
So perhaps I'm overdoing it here, but I wonder is this bad style (or aesthetically unpleasing, somehow), using 3 different ways to match types (and in one case, even defining a custom predicate)?
Would there be another, more consistent way to do this (or would you say it's not really something to worry about)? 

> If your email address did not end ".de" I would swear you were English.

That's nice to hear, but I don't quite believe it :-;

Thanks again, ciao,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20100428/a806280e/attachment.html>

Posted on the users mailing list.