<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><DIV>Hi,<BR><BR>I'm continuing to experiment with HDirect and the ihc compiler. Trying the "huge" type libraries from Office applications (Word, Excel...), I've met the following issue: some Haskell stubs do not compile out of the box, essentially because of type mismatch between the type signature generated by the ihc compiler and the stub's code. <BR>For instance:<BR><BR>&gt; Excel.hs:32:25:<BR>No instance for (Automation.Variant a0)<BR>arising from use of `Automation.outVariant' at Excel.hs:32:25-45<BR>Possible fix:<BR>add (Automation.Variant a0)<BR>to the type signature(s) for `global_getActiveCell'<BR><BR>The faulty declaration is indeed :<BR>  global_getActiveCell :: Global a1 -&gt; Prelude.IO a0<BR>  global_getActiveCell = Automation.propertyGet "ActiveCell" [] Automation.outVariant<BR><BR>whereas the
 correct type is (Automation.Variant a0) =&gt; Global a1 -&gt; Prelude.IO a0<BR><BR>There are also some cases where there is a type mismatch between "Int64" and "Automation.Date" type, but the essence of the error is the same : the type signature does not <BR> match the method's stub's code.<BR><BR>I've looked for an option in the compiler that would help (for instance, I suppose that removing all type signatures from the haskell file would allow to compile it), but I haven't found one.<BR><BR>NB : the ihc command line was "../src/ihc.exe --tlb -fautomation -fprefix-interface-name -fmaybe-optional-params -v  XL5EN32.OLB<BR>(where the OLB file is Excel's type library).<BR><BR>Did anyone experienced similar issue ?<BR><BR>Thanks in advance,<BR><BR>sL<BR><BR>PS: the COM library (without Automation) works well.<BR></DIV></div><br>
                <hr size="1"> 
Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! 
Profitez des connaissances, des opinions et des expériences des internautes sur <a href="http://fr.rd.yahoo.com/evt=42054/*http://fr.answers.yahoo.com">Yahoo! Questions/Réponses</a>.</body></html>