Here's the code it's complaining about.

 `(,@params -> ,rettype)

And here's the message:

Type Checker: Polymorphic function `qq-append' could not be applied to 
Types: (Listof a) (Listof b) -> (Listof (U a b))
Arguments: (Listof (List Any ': Any)) (List '-> Ffi-type)
Expected result: Ffi-type
 in: (quasiquote ((unquote-splicing params) -> (unquote rettype)))

Now what I'm building is a piece of Racket code that is to be written 
out into a new source-code file. 

param is indeed of type (Listof (List Any ': Any)).
rettype is indeed of type (List '-> Ffi-type)

And or some reason the type-checker isn't able to realise that I can 
really build a valid s-expression out of these components.

Now i could hand-expand the quasiquote in to a lot of cons operations, 
each presummably surrounded by 'inst' becausee cons is polymorphic,
but this will just make the entire expression unreadable.

I'm almost tempted to write this expression in untyped Racket.

But separating this stuff into another module would significantly 
demodularize the code -- related code will no longer be together.

Racket does have a compact mechanism to embed typed-Racket code in an 
untyped program (it's called with-type)

But there seems to be no similar way to embed an expression of untyped 
code into a typed-racket program.

How to get past this impasse?  The majority of my code needs to be in 
typed Racket to maintain my sanity while debugging, but the quasiquoted 
texts (there are a number of these) need to be readable, for the same 

-- hendrik

You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
To view this discussion on the web visit

Reply via email to