1. 23 Feb, 2016 1 commit
  2. 20 Jul, 2011 1 commit
  3. 12 Mar, 2008 1 commit
  4. 10 Jan, 2005 1 commit
  5. 18 Oct, 2004 1 commit
  6. 27 Jun, 2002 1 commit
    • simonmar's avatar
      [project @ 2002-06-27 15:38:58 by simonmar] · d3a2dc1e
      simonmar authored
      Finally fix foreign export and foreign import "wrapper" so that
      exceptions raised during the call are handled properly rather than
      causing the RTS to bomb out.
      
      In particular, calling System.exitWith in a foreign export will cause
      the program to terminate cleanly with the desired exit code.  All
      other exceptions are printed on stderr (and the program is
      terminated).
      
      Details:
      
      GHC.TopHandler.runMain is now called runIO, and has type IO a -> IO a
      (previously it had type IO a -> IO (), but that's not general enough
      for a foreign export).  The stubs for foreign export and forein import
      "wrapper" now automatically wrap the computation in runIO or its dual,
      runNonIO.  It turned out to be simpler to do it this way than to do
      the wrapping in Haskell land (plain foreign exports don't have
      wrappers in Haskell).
      d3a2dc1e