using greencard to write COM in haskell

One of the goals for greencard ( http://www.cs.york.ac.uk/fp/nhc13/greencard.html#SEC2 ) is: A convenient way to write COM software components in Haskell, and to call COM components from Haskell. Are there any examples of the first goal. I would like to be able to write COM components in Haskell, so far I found this example of calling haskell form C: http://www.cs.york.ac.uk/fp/nhc13/CcallingHaskell.html
From what i understand form that example is that you register a bunch of haskell functions with your C program.
So is there a way to start haskell form C? Ideally i would like something thats as easy to use as a dll, that the end use wouldn't be aware that they are using a component written in haskell. Also, I would like to have my haskell programs use my implementation of realloc which takes a context, is there an easy way to change ghc to use it? I guess I should start looking at the ghc source. Thanks, Anatoly

On 12/4/06, Anatoly Yakovenko
So is there a way to start haskell form C? Ideally i would like something thats as easy to use as a dll, that the end use wouldn't be aware that they are using a component written in haskell.
The things described at this URL have worked for me when it comes to DLLs and starting GHC's RTS: http://www.haskell.org/ghc/docs/latest/html/users_guide/win32-dlls.html HTH, Jason

Thanks, this is exactly what i was looking for.
On 12/4/06, Jason Dagit
On 12/4/06, Anatoly Yakovenko
wrote: So is there a way to start haskell form C? Ideally i would like something thats as easy to use as a dll, that the end use wouldn't be aware that they are using a component written in haskell.
The things described at this URL have worked for me when it comes to DLLs and starting GHC's RTS: http://www.haskell.org/ghc/docs/latest/html/users_guide/win32-dlls.html
HTH, Jason

Hello Anatoly, Tuesday, December 5, 2006, 1:32:27 AM, you wrote:
Also, I would like to have my haskell programs use my implementation of realloc which takes a context, is there an easy way to change ghc to use it? I guess I should start looking at the ghc source.
for which operations? if you mean using it for Haskell objects - it's impossible, because ghc by itself has very sophisticated memory control strategy -- Best regards, Bulat mailto:Bulat.Ziganshin@gmail.com
participants (3)
-
Anatoly Yakovenko
-
Bulat Ziganshin
-
Jason Dagit