Am Mittwoch 04 November 2009 22:03:09 schrieb Pasqualino "Titto" Assini:
> Hi,
>
> I am writing a little IPC system to make Haskell values and functions
> remotely invokable.
>
> To do so, I need (or so I believe) to make my objects accessible via a
> generic interface as in:
>
> class AFun f where
The problem lies in the definition of your class:
class AFun f where
afun :: Data a => f -> ([Dynamic] -> a)
You are saying that afun can return any type "a" that the user wants
as long as it is an instance of "Data", whereas here
instance Data v => AFun v where
afun f [] = f
afun _ _ =
Hi,
I am writing a little IPC system to make Haskell values and functions
remotely invokable.
To do so, I need (or so I believe) to make my objects accessible via a
generic interface as in:
class AFun f where
afun :: Data a => f -> ([Dynamic] -> a)
So my generic object is something that take