[Yhc] Some suggested changes to Yhc.Core

Dimitry Golubovsky golubovsky at gmail.com
Mon Aug 6 09:20:31 EDT 2007


Hi,

I'd support the idea of extending the primitive definition. My
addition is, to extend the meaning of the corePrimConv field, perhaps
to carry the information about external language the Core interacts
with (as much as it may be associated with calling convention). I'd
like to have ability to pass "javascript" into this field, even though
this may break the existing FFI convention (or would it? - are we
limited to only ccall and stdcall?). I'd also like to be able to have
a free syntax form for foreign identifier (corePrimExternal) (thus
being able to wrap calls to methods of Javascript objects such as "new
Date.getTime()":

foreign import javascript "new Date.getTime" getTime :: ...

This would help developers of backends to detect which primitives
imported from standard libraries (where they would be "ccall") are OK,
and which need to be substituted using Overlays, e. g. ycr2js could
complain if it encounters any primitive that uses "ccall".

Thanks.

PS Hopefully, it is not too late to add suggestions...

-- 
Dimitry Golubovsky

Anywhere on the Web


More information about the Yhc mailing list