Re: Error Interpreting Main with API

2008-04-28 Thread Simon Marlow
Simon Peyton-Jones wrote: | Would it also be appropriate to modify that wiki page to reflect some of | the changes between 6.6.1 and 6.8.2? I don't mind doing this at some point | today or tomorrow... Yes please, that would be vv helpful. Right; the page currently has a mixture of 6.6 and

RE: Error Interpreting Main with API

2008-04-22 Thread Simon Peyton-Jones
| The GHC API is behaving just like --make: it links the program if you | have a Main module. To ask it not to link, you want to do the same as | '--make -c', which in the GHC API means setting the ghcLink field of | DynFlags to NoLink. | | Thanks, this has solved the problem I was having. I

RE: Error Interpreting Main with API

2008-04-22 Thread C.M.Brown
Hi Simon, Yes I do, please! Would you feel up to doing so? I'm sure Simon'd check your text for veracity! I have modified the wiki, and added a new section under initialisation: http://www.haskell.org/haskellwiki/GHC/As_a_library Would it also be appropriate to modify that wiki page to

Re: Error Interpreting Main with API

2008-04-21 Thread Simon Marlow
C.M.Brown wrote: Hello, I am trying to use the API to interpret a Main module and get some type information from it. However, everytime I try to load a Main.hs module using the API I get the following error message: /usr/local/packages/ghc-6.8.2/lib/ghc-6.8.2/libHSrts.a(Main.o): In function

Re: Error Interpreting Main with API

2008-04-21 Thread C.M.Brown
Simon, The GHC API is behaving just like --make: it links the program if you have a Main module. To ask it not to link, you want to do the same as '--make -c', which in the GHC API means setting the ghcLink field of DynFlags to NoLink. Thanks, this has solved the problem I was having. I