
9 Apr
2007
9 Apr
'07
8:57 a.m.
I tried the code below with both ghc 6.2.2 and hugs march 2005. ghc: "The last statement in a 'do' construct must be an expression" Hugs ERROR "interactive.hs" - Can't find imported module "System.Process" .
---------------------------------------------------------------------------------- import System.IO import System.Process
eval :: String -> IO String eval s = do (_,hOutput,_,hProcess) <- runInteractiveCommand s sOutput <- hGetContents hOutput waitForProcess hProcess return sOutput ----------------------------------------------------------------------------------
http://RepublicBroadcasting.org - Because You CAN Handle The Truth! http://iceagenow.com - Because Global Warming Is A Scam!