>[I'm not sure if this should be hugs-bugs or hugs-users - definitely a >borderline case. Replies should probably come to me or to hugs-bugs.] > >> I'm attempting to use green card generated code for a project >> (why don't mutable arrays work?) > >I wasn't aware they didn't. In fact, I'm not even sure what you mean >- can you give some more details. The distribution of Hugs that I have came with a faulty ST.hs file. When I try to run it through the interpreter, I get an error on the line that reads: primitive runST :: (forall s. ST s a) -> a that says: ERROR "/boot/home/config/share/hugs/lib/exts/ST.hs" (line 48): Syntax error in type expression (unexpected `.') Also, even when I attempt to fix the file so that this error goes away, it seems as though the STArray functions don't work (ie, attempting to alter an element of the array doesn't actually alter the array) >> and I can't get any information on where to put the generated .so >> file so that I can access the functions I have generated. > >I can't remember if this is documented anywhere (it certainly should be). > >1) GreenCard generates a .hs and a .c file which you compile/link to get > a .so file. > >2) Place both files in the same directory and put that directory on Hugs' > path so that when you say "import Foo" or ":load Foo", Hugs will find > the .hs file and, from that, know where the .so file is (i.e., in the > same directory). > >Putting them in the same directory is an easy way of (virtually) >eliminating version skew. My mental model is that they are a single >_logical_ file which is split into two because of technical >restrictions in Unix and Win32. following your instructions, I still get the error: ERROR "/boot/home/Applications/gc-2.01/lib/hugs/StdDIS.hs": Unable to load GreenCard primitives now, I have not divulged all the information involving my problem ... I wanted to see if I could get some real help before I cracked ... I'm actually trying to get this to run on BeOS. I've got hugs compiled and running (as it has been for months) and I'm now trying to extend my use of Haskell by using GC. The trouble here is that gcc -shared does not work. Is it possible that the .SO files generated on Be are not compatible with Hugs? And before you're quick to say "No way!", bear in mind that the binary format of Be is ELF ... just like linux (for which I'm sure you have many happy GC users). Looking forward to any more help you might be able to give me. -Justin
Re: Getting Hugs to recognize new primitive functions
Justin: Extraordinarily Lanky Sun, 26 Mar 2000 17:12:38 -0800
- Getting Hugs to recognize new primitive func... Justin: Extraordinarily Lanky
- Re: Getting Hugs to recognize new primi... Alastair Reid
- Re: Getting Hugs to recognize new primi... Justin: Extraordinarily Lanky
- Re: Getting Hugs to recognize new primi... Steinitz, Dominic J
