Re: forkProcess type changed?
George Russell wrote: For the development snapshot 6.3.20031201, System.Posix.forkProcess has the type IO () -> IO System.Posix.Types.ProcessID. In 6.0.1 it has type IO () -> IO (Maybe System.Posix.Types.ProcessID). Is this change intentional, and if so how are you supposed to test after the fork if this is the parent or child process? The following example should explain everything: Old Version: do mbPid <- forkProcess case mbPid of Nothing -> putStrLn "Child" Just pid -> putStrLn $ "Parent of " ++ show pid New Version: do pid <- forkProcess (putStrLn "Child") putStrLn $ "Parent of " ++ show pid Cheers, Wolfgang ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Re: forkProcess type changed?
On Thu, Dec 11, 2003 at 04:44:37PM +0100, George Russell wrote: > In 6.0.1 it has type IO () -> IO (Maybe System.Posix.Types.ProcessID). Isn't it rather IO (Maybe System.Posix.Types.ProcessID) ? Best regards, Tom -- .signature: Too many levels of symbolic links ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
RE: forkProcess type changed?
> For the development snapshot 6.3.20031201, System.Posix.forkProcess > has the type IO () -> IO System.Posix.Types.ProcessID. In 6.0.1 > it has type IO () -> IO (Maybe System.Posix.Types.ProcessID). Is > this change intentional, and if so how are you supposed to test > after the fork if this is the parent or child process? Yes, this is intentional. It turned out to be far too difficult to implement forkProcess as it was previously defined (problems with what happens when the current thread returns in the child process was one difficulty, IIRC). The previous implementation had some serious bugs. See the docs for the new version here: http://www.haskell.org/ghc/docs/6.2/html/libraries/unix/System.Posix.Pro cess.html#v%3AforkProcess Cheers, Simon ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
forkProcess type changed?
For the development snapshot 6.3.20031201, System.Posix.forkProcess has the type IO () -> IO System.Posix.Types.ProcessID. In 6.0.1 it has type IO () -> IO (Maybe System.Posix.Types.ProcessID). Is this change intentional, and if so how are you supposed to test after the fork if this is the parent or child process? ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
RE: import modules from a different directory
> Anybody has the experience of importing a module from a different > directory?In my code, i need to import a module that is not > in the current > directory. How can I do that in GHC? GHC-specific questions are best asked on [EMAIL PROTECTED] (where I've sent this followup). You'll find the -i option to GHC will do what you want. Documentation is here: http://www.haskell.org/ghc/docs/latest/html/users_guide/separate-compilation.html#OPTIONS-FINDING-IMPORTS Cheers, Simon ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users