Re: [Haskell-cafe] Getting segmentation fault when profiling, despite `-K100M'.

2011-08-16 Thread Christopher Wilson
On Tue, Aug 16, 2011 at 12:42 PM, Niklas Larsson wrote: > If you want to call a Haskell function from C you should do a "foreign > export" of the function, that will create a stub function with C > calling convention that you can call. I put an example of how to do this on Rosetta Code: http://

Re: [Haskell-cafe] Getting segmentation fault when profiling, despite `-K100M'.

2011-08-16 Thread Niklas Larsson
Reading a bit closer I assume you have already done that. Sorry for that. Regards, Niklas 2011/8/16 Niklas Larsson : > If you want to call a Haskell function from C you should do a "foreign > export" of the function, that will create a stub function with C > calling convention that you can call.

Re: [Haskell-cafe] Getting segmentation fault when profiling, despite `-K100M'.

2011-08-16 Thread Niklas Larsson
If you want to call a Haskell function from C you should do a "foreign export" of the function, that will create a stub function with C calling convention that you can call. Regards, Niklas 2011/8/16 David Banas : > Hi all, > > I'm trying to profile a mixed language program, in which Haskell is N

Re: [Haskell-cafe] Getting segmentation fault when profiling, despite `-K100M'.

2011-08-16 Thread Bas van Dijk
On 16 August 2011 15:56, David Banas wrote: > Any thoughts? Just a hunch, did you specify the correct calling convention for amiInit? ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Getting segmentation fault when profiling, despite `-K100M'.

2011-08-16 Thread David Banas
Hi all, I'm trying to profile a mixed language program, in which Haskell is NOT the top layer and does not contain the `main' function. (C is/does.) Is this effort doomed to fail? I'm getting a segmentation fault, as soon as the first Haskell function is called, despite having included `-K100M'