Why not leave the defaults as they ARE OR USE utf-8 and give the
programmer the capability to specify what encoding they want when
they want to use a different one?
John
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
Thankyou both Don Stewart and Simon Marlow for your responses.
By adding yield and threadDelay in certain spots I have at least prevented
some of the threads from being starved of CPU time.
The only issue now is that terminateProcess doesn't always terminate
netstat.exe in the cmd.exe so I
I am running my program in WinXP with ghc 2.6.8
If you install netstat and change the parameters it should still work in
linux.
Why does thread # 3 dominate over the over threads int the output?
Why does thread # 4 never seem to run?
I can't use the sleep function in System.Process.Win32 since
If you redefine as follows:
server :: [Integer] - Writer [String] [Integer]
server [] = return []
server (a:as) = do
tell [Server ++ show a]
rs - server as
return (a:rs)
You get this for the output:
[Server 0,Server 1,Server 2,Server 3,Server 4,Server 5,Server
6,Server 7,Server 8,Server
Here is what I have tried:
module Main where
import System.Process -- using runInteractiveProcess
import System.Posix.Types
import System.Process.Internals
import Control.Concurrent.MVar
main = do
(input,output,err,ph) - runInteractiveProcess calc.exe ([]) Nothing
Nothing
p - Main.getPID
You do realize that the example you gave is just as general as all the
tutorials.
Here is an example I was working, but it gives a *segmentation fault* for
some reason:
example.h
typedef struct
{
unsigned char a;
unsigned char b;
unsigned char c;
unsigned char d;
} IP;
IP* shiftIP(IP* addr);
Yup, that fixed the problem. Thanks for your help. :)
On 10/22/07, Simon Marlow [EMAIL PROTECTED] wrote:
John Vogel wrote:
Running ghc 6.6.1
On Windows Vista
I get this error when I run: ghc Main.hs
gcc: installation problem, cannot exec `as': No such file or directory
Running ghc 6.6.1
On Windows Vista
I get this error when I run: ghc Main.hs
gcc: installation problem, cannot exec `as': No such file or directory
On this code:
module Main where
main = do
putStrLn Please enter your name:
name - getLine
putStrLn (Hello, ++ name ++ , how are you?)
It is the default gcc with ghc.
ghci works just fine which invokes ghc --interactive.
But this command does work:
ghc -e Main.main Main.hs
But there is no executable.
On 10/21/07, Matthew Danish [EMAIL PROTECTED] wrote:
On Sun, Oct 21, 2007 at 01:46:16PM -0500, John Vogel wrote:
gcc