Hi!
Is there any more information floating around wrt. the Dynamic extensions of
GHC (or hugs)?
The lib-docs say, it may be usable in Distributed Programming, but currently
I have no idea how to transport values of type Dynamic over some kind of net
connection to another instance of a program and then receive it on the other
side (the net connection itself is NOT the problem!).
IIRC, Dynamic is typed like "data Dynamic = Dynamic TypeRep Obj". `TypeRep'
is a tag, which denotes the 'real' type and `Obj' is a placeholder to which
the data is converted to via `unsafeCoerce' (*ugh*, strong type system, eh?
:-)).
One problem is, how to write a send/recv pair, which has default methods for
"standard" Dynamic types (Int, Chars, Tuples, Lists, etc.), but is also
extendable, to add later handling of arbitrary algebraic data types,
invented by a user.
Sending/receiving data of type Int, Char, etc. directly (without Dynamic)
can be done with a "class ... where { send :: ..., recv :: ... }", with a
default of sending string representations of data, provided it is of
instanced Read and Show. With Dynamic, this isn't possible any more...
Next, `mkTyCon' works ok with one node, but the mapping on Ints with this
`unsafePerformIO (newIORef 0)' hack has to be extended to make it's usage
safe between several nodes.
Just wondering,
Michael
--
W*ndoze NT is faster... CRASHING!