RE: GHC API: How to determine Type.Type equality when using type operators?

2009-07-03 Thread Simon Peyton-Jones
I believe that you are asking about type functions. Specifically, I think what you are asking is this: How can I normalise a type, by rewriting it exhaustively using the top-level type-function definitions I think the function TcTyFuns.tcNormaliseFamInst (rather an odd name!) does th

Re: How to save a haskell data structure in C?

2009-07-03 Thread Malcolm Wallace
In C code, I want to save a complex data strcuture defined in haskell and pass it back to a haskell function at certain time. Look up "StablePtr" in Haskell's FFI spec. Regards, Malcolm ___ Glasgow-haskell-users mailing list Glasgow-haskell-use

How to save a haskell data structure in C?

2009-07-03 Thread Shu Wu
Hey, folks. I've got a problem which I've thought about for days. I need to write a program that mixes C and haskell code. And the C code controls the procedure. In C code, I want to save a complex data strcuture defined in haskell and pass it back to a haskell function at certain time. Like the fo