Is it possible to create a COM object using Haskell and use another COM object there?

At the moment, I think that what I want is nonsense, and no one knows anything about it ...

But it will be useful for use in production, if possible, so I ask a question.

An example of what I want to have:

let A<'T> progid =
    Activator.CreateInstance
        ( Type.GetTypeFromProgID progid )
            :?> 'T

let cm = A<ISerialPort> "SerialPort.1"
let h  = A<IHaskell>    "Haskell.1"

let data = h.getData(cm)

I know there is http://hackage.haskell.org/package/hdirect , but I can’t even imagine how to use it ... (Not sure if it should also be updated for the latest hasfell FFI)

A simple example of what I want will be perfect!

+3
source share

All Articles