Re: [Haskell-cafe] Getting a segmentation fault when starting/stopping the RTS, from C, several times.

2012-07-15 Thread Albert Y. C. Lai
On 12-07-15 08:37 PM, Felipe Almeida Lessa wrote: Would that be: Prog ::= nop | hs_init(); Prog'; hs_exit(); Prog' ::= nop | hs_init(); Prog'; hs_exit(); | Prog' Prog' Yeah, I keep forgetting that. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.

Re: [Haskell-cafe] Getting a segmentation fault when starting/stopping the RTS, from C, several times.

2012-07-15 Thread Felipe Almeida Lessa
Em 15/07/2012 18:38, "Albert Y. C. Lai" escreveu: > > On 12-07-10 11:35 PM, Brandon Allbery wrote: >> >> Quoth the Fine Manual (8.2.1.1. Using your own main() >> < http://www.haskell.org/ghc/docs/latest/html/users_guide/ffi-ghc.html#using-own-main >): >> >> There can be multiple calls to |hs_init(

Re: [Haskell-cafe] Getting a segmentation fault when starting/stopping the RTS, from C, several times.

2012-07-15 Thread Albert Y. C. Lai
On 12-07-10 11:35 PM, Brandon Allbery wrote: Quoth the Fine Manual (8.2.1.1. Using your own main() ): There can be multiple calls to |hs_init()|, but each one should be matched by one (and only one) call to |hs_

Re: [Haskell-cafe] Getting a segmentation fault when starting/stopping the RTS, from C, several times.

2012-07-10 Thread Brandon Allbery
On Tue, Jul 10, 2012 at 10:55 PM, Captain Freako wrote: > Hi experts, > > Should I expect the following C code to run to completion, or am I trying > to do something that was never intended? > Quoth the Fine Manual (8.2.1.1. Using your own main()

[Haskell-cafe] Getting a segmentation fault when starting/stopping the RTS, from C, several times.

2012-07-10 Thread Captain Freako
Hi experts, Should I expect the following C code to run to completion, or am I trying to do something that was never intended? Thanks, -db C code: 1 #include 2 #include 3 #include "HsFFI.h" 4 5 int main() 6 { 7 int argc = 1, i; 8 char* argv[] = {"ghcDll", NULL}; // arg