#2863: ghc manual should note FFI non-compliance
-----------------------------+----------------------------------------------
Reporter:  duncan            |          Owner:                  
    Type:  bug               |         Status:  new             
Priority:  normal            |      Component:  Documentation   
 Version:  6.10.1            |       Severity:  normal          
Keywords:                    |       Testcase:                  
      Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple
-----------------------------+----------------------------------------------
 The FFI spec says about hs_init and hs_exit:

   In addition to nested calls to `hs_init()`, the Haskell system may be
 de-initialised with `hs_exit()` and be re-initialised with `hs_init()` at
 a later point in time.

 The GHC manual says in the FFI chapter:

   There can be multiple calls to `hs_init()`, but each one should be
 matched by one (and only one) call to `hs_exit()`[11].

 and adds in the footnote:

   [11] The outermost `hs_exit()` will actually de-initialise the system.
 NOTE that currently GHC's runtime cannot reliably re-initialise after this
 has happened.

 The chapter on known bugs and infelicities should have a section on non-
 compliance with the FFI part of the spec and should note this limitation,
 that `hs_init()` does not necessarily work after the last `hs_exit()`
 call.

 Of course if this can be fixed then that would be great. If not then
 perhaps it is better to make it fail obviously rather than possibly
 working or possibly going horribly wrong.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2863>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to